I am writing some script to make a directory, but I want firstly sure that the name that the user insert is correct. for this issue I wrote something like below (FILE.txt is the file which the user name saved in)
if grep -q '>' FILE.txt
then
echo "You should avoid inserting ">" in your code!"
fi
But it seems that the bash thought that I want to insert to output and so it give this error: -sh: syntax error near unexpected token `newline' Do anybody have some idea? tnx for help