Skip to main content

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?

quote posted hantechbl view post
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?
depends output comes from
quote posted hantechbl view post
2) possible cycle through bash array?
yes
quote posted hantechbl view post
3) there way can download php output webserver , save file without wget.
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.
quote posted hantechbl view post
4) there way can have init start script different user , have run in background?
a bit outside of knowledge should doable since see several daemons running under own ids.
quote posted hantechbl view post
5) can set description process can retrieve pid multiple of same process, or launch program can export pid variable? if how?
when start process pid avaialble in special variable "$!", start several processes in background , wait them terminate:
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
quote posted hantechbl view post
6) possible can save data remote mysql server, if how?
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.


Forum The Ubuntu Forum Community Ubuntu Specialised Support Development & Programming Programming Talk [BASH] Scripting Questions


Ubuntu

Comments

Popular posts from this blog

Upgrade 3.4.8 to 3.5.1 failed "download package failed" - Joomla! Forum - community, help and support

Joomal 3.6.3 update error - PHP temporary folder is not set - Joomla! Forum - community, help and support

Fatal error during instalation - Joomla! Forum - community, help and support