osx
August 17th, 2009, 08:31 PM
I'm reading a book on bash scripting called "Linux Shell Scripting with Bash" that was published in 2004. On page 67 it says variables are declared using the Bash declare command.
I'm not totally new to Bash scripting, but not extremely well versed either; however, I have not seen the declare command used routinely in scripts posted online, nor ever used it myself.
I would like to know whether or not I should.
Is there an advantage/disadvantage to using the declare command for each and every variable?
Thanks.
I'm not totally new to Bash scripting, but not extremely well versed either; however, I have not seen the declare command used routinely in scripts posted online, nor ever used it myself.
I would like to know whether or not I should.
Is there an advantage/disadvantage to using the declare command for each and every variable?
Thanks.