Friday, October 21, 2011

UNIX: Searching within the file

Go to 10th line
10G

Then what does G does?
Go to last line.

Search for a pattern in the file
Enter '/', will take you to the end of the file and then provide the patter to search...

primary players. Each is a little different from the other.) Another contributor to the sprawl
of modern UNIX is the energy of the UNIX programming community; plenty of UNIX users
decide to write a new version of a command in order to solve slightly different problems, thus
spawning many versions of a command.
C
/



primary players. Each is a little different from the other.) Another contributor to the sprawl
of modern UNIX is the energy of the UNIX programming community; plenty of UNIX users
decide to write a new version of a command in order to solve slightly different problems, thus
spawning many versions of a command.
C
/decide



primary players. Each is a little different from the other.) Another contributor to the sprawl
of modern UNIX is the energy of the UNIX programming community; plenty of UNIX users
decide to write a new version of a command in order to solve slightly different problems, thus
spawning many versions of a command.
C
/decide



To find next occurence press "n"

What if I need to search backward
ans:
use the command ?
primary players. Each is a little different from the other.) Another contributor to the sprawl
of modern UNIX is the energy of the UNIX programming community; plenty of UNIX users
decide to write a new version of a command in order to solve slightly different problems, thus
spawning many versions of a command.
C
?decide



Now when you enter command "n" it will search backward!!

No comments:

Post a Comment