Thread: [BASH] Scripting Questions
i have several questions pertaining combination of bash functions:
1) possible read output screen (in background), , if parse new lines, based upon parsed lines perform actions?
2) possible cycle through bash array?
3) there way can download php output webserver , save file without wget.
4) there way can have init start script different user , have run in background?
5) can set description process can retrieve pid multiple of same process, or launch program can export pid variable? if how?
6) possible can save data remote mysql server, if how?
depends output comes from
yes
yes, use curl instead. seriously, don't expect on own, unless have lots of time on hands. there plenty of details take care of, basic connections.
a bit outside of knowledge should doable since see several daemons running under own ids.
when start process pid avaialble in special variable "$!", start several processes in background , wait them terminate:
i never used mysql, if it's others, 1) matter of configuring db accept remote connections, , 2) configure remote client (ie, side) tell (ip/port/name, usually) db is.code:# keep pids of launched stuff set -a pids # launch background processes , store pid f in stuff_to_launch launch_stuff & pids[${#pids[*]}]=$! done # wait processes terminate pid in ${pids[*]} wait $pid print "sensed end of $pid" done
Forum The Ubuntu Forum Community Ubuntu Specialised Support Development & Programming Programming Talk [BASH] Scripting Questions
Ubuntu
Comments
Post a Comment