Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] bash question



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

> I've also tried:
> 
> if [ $proc -gt 400 ] then
>    echo "You have more than 400 procs running"
> fi
> 
> but that throws a:
> 
> ./t.sh: line 5: syntax error near unexpected token `fi'
> ./t.sh: line 5: `fi'

Either put a semi-colon after the closing brace on your "if" or put "then" on a new line.  It won't work the way you've got it (then is a seperate 'command'... sort of).

After that, it should be fine.

- -- 
Mike Gauthier
All-purpose lackey

"Beer is proof that God loves us and wants us to be happy." - Ben Franklin


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)

iD8DBQE+UNSbPdkwuKJb1CIRArwMAKCHBmZQXtNpIMdnesM+bJmGisJz+gCg3bXd
hncKM6gv1y6RbW9JkE17hGM=
=tDDv
-----END PGP SIGNATURE-----


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links