Archive for category Linux
grep – Unix commands
Dec 2
>grep foo file
- returns all the lines that contain a string matching expression “foo” in the file “file”
>ls | grep filename
- the ‘|’ symbol is called a pipe this is similar to > in dos in other words it is feeding the results from ls (list files like dir cmd in dos) and searching it for a filename
>ls | grep .xml
- show all filenames with .xml in their name
>grep -i hari *
-se Read More
