Hi, i have the following code, but when i enter the word to add, the following error appears line 6: $file: ambiguous redirect. Does anyone know why?
echo "enter file"
read file
echo "enter word to add"
read word
echo "$word" >> $file
Thanks for your help.
i'm trying to get the user to enter a word, then the script should search for how many of that word exists in the file. For example, I want it to say, "There are 7 'and' words in the file", or "There are 5 'the' words in the file" etc...
I have the following which I used to find a specific...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.