Re: Commmand to find a string in a text file ...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




David FAHED wrote:

> I'm looking for a command or a script that is able to find a string in a text file.
> But I want to display for example 10 lignes before the string, I search, and 10
> lignes after.

	grep -10 ...

You can also use the -B and -A switches, as described in the grep(1)
manpage.

-- 
Glynn Clements <glynn@sensei.co.uk>
-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.rutgers.edu


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux