right now I have multiple instructions that I have to add separately by manual labor (start terminal, copy paste instructions, insert instructions into text file), so I thought there must be a way to pack all of these commands into a single text file and have it run once.
For example I need to do 2 configurations:
1st Configuration
create file with:
sudo nano /usr/local/bin/loadFlysoftPOS
copy following text into the above text file:
#/bin/bash until pids=$(pidof mysqld) do sleep 1 done cd ~/Dokumente/dist/ java -jar POSv2.jar > log.txt
make it runnable by current user
sudo chmod +x /usr/local/bin/loadFlysoftPOS
2nd Configuration
create file:
sudo nano /etc/udev/rules.d/10-local.rules
insert text into file:
SUBSYSTEMS=="usb", DRIVERS=="usb", ATTRS{idVendor}=="0525", ATTRS{idProduct}=="a700", SYMLINK+="usb/sewoo1", GROUP="lp"
So is it possible to store all those instructions into a single script and have it run once? Also importantly is to override any existing file, so if there already is a file called /etc/udev/rules.d/10-local.rules, its content should be cleared and overwritten by the contents provided by the new script.
Thanks guys for the enlightment!