Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. asd1234qwerty

    line 6: $file: ambiguous redirect

    this is all of the code that i am using. when it asks for the file, i simply enter 'text' without the quotations, which is the name of the file which already contains some text in it. Thanks a lot. echo echo "file?" read $file echo "Enter the new line to add:" read newline echo "$newline" >>...
  2. asd1234qwerty

    line 6: $file: ambiguous redirect

    i just realized that i needed to add quotation marks to make "$file". But now, it says cannot find file or directory, but it does exist...
  3. asd1234qwerty

    line 6: $file: ambiguous redirect

    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.
  4. asd1234qwerty

    tell me how many specific words there are in the file?

    thanks for your reply. Would this work in the same way to find the number of sentences in the text by separating any text after a full stop onto a new line and then using grep to count the number of lines with a full stop? thanks again.
  5. asd1234qwerty

    tell me how many specific words there are in the file?

    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...

Part and Inventory Search

Back
Top