Thread: $ bash myscript
View Single Post
Old 30-10-2006, 13:13   #6
The Jackal
Inactive
 
Join Date: Oct 2006
Posts: 1,604
The Jackal has a bronzed appealThe Jackal has a bronzed appeal
The Jackal has a bronzed appealThe Jackal has a bronzed appealThe Jackal has a bronzed appealThe Jackal has a bronzed appealThe Jackal has a bronzed appealThe Jackal has a bronzed appealThe Jackal has a bronzed appealThe Jackal has a bronzed appealThe Jackal has a bronzed appeal
Re: $ bash myscript

Quote:
Originally Posted by altis View Post
I don't know why Linux peeps like to make life so hard for themselves. There are at least two ways to run a script.
Heh
There are two types of ppl in this world my friend :

Those with guns

And those who dig.

----
Just pointing out the good the bad and the ugly wrt scripting.

Once you have hundreds of these scripts and want one to execute one with another and return the resultsets then you'll realise pretty sharpish if only i had put the stupid line at the start of my scripts i wouldn't be in this pickle.

Good programming practice too : shudders at the thought of code in a txt file : code in a text file what type of code is it ?

file <filename> would tell me straight away
file <yourfile> would say text file

More importantly how do you execute <yourfile> what if I use a different interpreter to bash say tclsh and in inadvertently a safe command in bash becomes an 'rm-rf /' in tclsh.

Your choice have fun coding.

---------- Post added at 12:13 ---------- Previous post was at 12:05 ----------

PS I'm not having a moan here just pointing out some best practices afterall I think its great you're doing some scripting
The Jackal is offline   Reply With Quote