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
|