Re: Bash scripts troubles with Tomsrtbt... Help!

Tom Oehser <[email protected]>
Newsgroups gmane.linux.tomsrtbt
Message-ID <[email protected]>
> I have troubles with Bash scripts an Tomsrtbt:

It isn't Bash, you have to use standard Bourne shell syntax.

> I=$[$I+1]

In general, shells don't do addition.  (Well, Bash does...)

Use something like:

	I=$(lua -e 'print('$I'+1)')

> if [ ! -z $A ]; then

You have to quote it, like:

	if [ ! -z "$A" ]; then

So that it isn't just expanded as a null missing argument.

-Tom

P.S. - See "man ash", tomsrtbt has most man pages.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.