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

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

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

> -----Original Message-----
> From: David FAHED [mailto:dfahed@outremer.com]
> Sent: Thursday, July 27, 2000 4:24 PM
...
> 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.

looks to me like you're really looking for the manual of grep ;)

grep -10 '<tekststring>' <fileregexp>

- -----snip-----snip-----snip-----snip-----snip-----snip-----
...
- -NUM Matches will be printed with NUM lines of leading and trailing
context...
...
- -A NUM, --after-context=NUM
...
- -B NUM, --before-context=NUM
...
- -----snip-----snip-----snip-----snip-----snip-----snip-----

******* Groetjes vanwege ***** Greetings From *******
Dieter Demerre - http://www.angelfire.com/de/ddemerre
  ddemerre@acm.org - ext.dieter.demerre@siemens.be

Although this private and confidential e-mail has been sent 
to you through a personal Siemens account, it does NOT 
represent any official opinion of Siemens.

If you are not the intended recipient of this e-mail and 
have received it in error, please notify the sender by 
replying with 'received in error' as the subject and then 
delete it from your mailbox.

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 6.5.3 for non-commercial use <http://www.pgp.com>

iQA/AwUBOYA34wlG34XnM6kpEQIW0gCfXwmA4MO849kPFIXvgWitLQFiWdsAn307
I8+XjgxSFKAilo598bayiuGw
=EXgG
-----END PGP SIGNATURE-----
-
: 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