PDA

View Full Version : [ubuntu] Help needed with scripting, I think thats what it is :)



cackles
May 19th, 2008, 05:10 AM
Im going to assume its just called scripting, I want to put together my own script for muliple commands and maybe get into something more advanced. I can do the easy stuff and did used to make mIRC scripts. But because Im new to this I keep searching for the wrong things. Is there a decent tut out there?

Something thats really bugging me ... --help ... I seen in a script the 'set -e' command and wanted to know what it done. I done 'set --help' and it gives me the commands, but its not telling me what they do. Can someone point me in the right direction please.

SIXAXIS
May 19th, 2008, 05:14 AM
What do you mean by scripts? Do you mean like a .bat file in Windows?

HotShotDJ
May 19th, 2008, 05:21 AM
Im going to assume its just called scripting, I want to put together my own script for muliple commands and maybe get into something more advanced.Start here: http://tldp.org/LDP/abs/html

cackles
May 19th, 2008, 11:45 AM
Thanks for that DJ, lots of good stuff in there. I just cant seem to get my if statements correct, they keep hanging.

Im trying to write

if service/file/name doesnt exist then
do this
do this
else do this

I must be missing something obvious, though I dunno if Im even in the ballgame for checking the file/service. I tried to use grep and I cant remember what Im on now ... sleepy time soon methinks ... been saying that for almost 12hrs.

hyper_ch
May 19th, 2008, 11:45 AM
http://www.linuxcommand.org

bartcramer
May 19th, 2008, 12:27 PM
A lot of the things you want are easily doable with Python, something in between scripting and programming. Very well documented. Check www.python.org.

HTH.

cackles
May 20th, 2008, 02:37 PM
Thanks for the replies and links, I'll get my head stuck into them.