Hello
I want to make two shell scripts but they shell scripts isnt exactly my language :P
The following is all pseudocode
The first script will run every say 5 minutes:
if /tmp/media/sda1 exists or /tmp/media/sda2 exists or /tmp/media/sda3 exists or /tmp/media/sda4 exists
then do
variable storage=what ever above first returns true (lets say /tmp/media/sda3)
//storage=/tmp/media/sda3
if storage+"/"+.runmescript exist
then do
./runmescript
end if
end if
thats the first one.
Now we have on the harddrive a file called "someconf" at /etc/ also at /tmp/media/sda3 we have a file called "update". someconf has a line that says "dot=99" while update has a line that says "dot=11"
".runmescript" would be.
load /etc/someconf
search for "dot=99" in /etc/someconf
load /tmp/media/sda3/update
search for "dot=11"
replace line from update in somesonf
save
how can i do this? thank you!