Re: small if statement in shell script

2005-06-24 Thread Andy Rowan
At 05:29 PM 6/22/2005, Chris F.A. Johnson wrote: On 2005-06-22, [EMAIL PROTECTED] wrote: > Hello, > > I have an if statement, something like: > > if [ "$day" = "Thu" ]; then > tar -cpf /var/backups/homethu.tar /home > fi > > If I decide to pound out the tar command, then the script > will error

Re: small if statement in shell script

2005-06-22 Thread Chris F.A. Johnson
On 2005-06-22, [EMAIL PROTECTED] wrote: > Hello, > > I have an if statement, something like: > > if [ "$day" = "Thu" ]; then > tar -cpf /var/backups/homethu.tar /home > fi > > If I decide to pound out the tar command, then the script > will error and it won't continue on. > Is it possible to pound

Re: small if statement in shell script

2005-06-22 Thread Marty
[EMAIL PROTECTED] wrote: Quoting [EMAIL PROTECTED]: Quoting [EMAIL PROTECTED]: You have to have something for the shell to run. Try setting a new variable to 1 or some such silly-ness and it will work. Or else you have to comment out the entire if statement. I guess I could just add an b

Re: small if statement in shell script

2005-06-22 Thread michael
Quoting [EMAIL PROTECTED]: Quoting [EMAIL PROTECTED]: You have to have something for the shell to run. Try setting a new variable to 1 or some such silly-ness and it will work. Or else you have to comment out the entire if statement. I guess I could just add an blank echo command? Someth

Re: small if statement in shell script

2005-06-22 Thread Michael Marsh
On 6/22/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I have an if statement, something like: > > if [ "$day" = "Thu" ]; then > tar -cpf /var/backups/homethu.tar /home > fi Try the following: if [ "$day" = "Thu" ]; then tar -cpf /var/backups/homethu.tar /home : fi If you comment out the ta

Re: small if statement in shell script

2005-06-22 Thread kevin . kempter
On Wednesday 22 June 2005 14:35, [EMAIL PROTECTED] wrote: > Hello, > > I have an if statement, something like: > > if [ "$day" = "Thu" ]; then > tar -cpf /var/backups/homethu.tar /home > fi > > If I decide to pound out the tar command, then the script > will error and it won't continue on. > Is it

small if statement in shell script

2005-06-22 Thread michael
Hello, I have an if statement, something like: if [ "$day" = "Thu" ]; then tar -cpf /var/backups/homethu.tar /home fi If I decide to pound out the tar command, then the script will error and it won't continue on. Is it possible to pound out the tar command and still leave the if statement intac