Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

Display lines containing the pattern “root” and 3 lines after them in the file /etc/passwd.

root@Linux-world:~# grep -B 4 "games" /etc/passwd
Source by www.linuxtechi.com #
 
PREVIOUS NEXT
Tagged: #Display #lines #pattern #lines #file
ADD COMMENT
Topic
Name
5+4 =