Problem with unix if statement
I getting the folowing error with my if then statement. What am I doing wrong?
./clearhis.sh ./clearhis.sh: line 4: syntax error near unexpected token `then' ./clearhis.sh: line 4: `then' cat clearhis.sh #!/bin/bash for A in /home/*; do if[ -f "$A/.bash_history" ] then >"$A/.bash_history" fi done |
Put a space between if and [
|
Thanks!
|
Remember that '[' is actually the name of a program.
|
All times are GMT -5. The time now is 07:18 PM. |