search string command
1.i want to know command for search a string in file without opening file from vi editor.
2nd question.when i open file with vi editor in linux, i can search string by (in esc mode) "/search_string" command. This will search string from starting of file what will be command if i want to search string from "end of file" in "vi opened file". |
1. grep.
|
Quote:
Code:
cat file.txt | grep <pattern> |
please please describe in proper syntax and what is answer of 2nd question
|
You can use various utitlities to search file---eg GREP, SED, AWK
As for the VI question, does the manual (or man page) say anything about this? |
Quote:
|
Quote:
Do you have some kind of reference material? (e.g. the Bash Guide for Beginners) |
1. grep string file
2. :?string-to-find (? = search backwards) |
All times are GMT -5. The time now is 11:32 AM. |