lug-bg: grep, sed, cut - output manipulating
- Subject: lug-bg: grep, sed, cut - output manipulating
- From: danchev@xxxxxxxxx (George Danchev)
- Date: Sun, 9 Sep 2001 00:05:18 +0300
imam sledniq vupros:
grep-vam po daden patern , oba4e iskam da se output-vat samo stringovete
otgovarqsti na kriteriq, a ne celite redove. Primer sys slu4aen input:
cat random_text.txt | grep appl
ste output-ne celi redove sydyrzhasti "app", no kak da gi "iz4istq" taka, 4e
da se output-vat samo stringove otgovqrqsti na patern-a - primerno apple ,
application i t.n.?
izvesten po podredba (predvidim) input:
primerno:
#!/bin/bash
IP=`ifconfig |grep 212.*`
mozhe li da se output-ne za dadeniq line, samo char-ovete primerno ot 10-25
vklu4itelno i nisto drugo ?
"interval" i "TAB" susto li se broqt za char ?
"cut" i "sed" bi trqbvalo da pomognat v slu4aq ama nesto nezacepvam kak da gi
vpregna da svurshat rabota ili mozhe bi stava i po drug na4in ?
ta vuprosa mi e za formatirane na output-a.
Blagodarq !
===========================================================================
A mail-list of Linux Users Group - Bulgaria (bulgarian linuxers)
http://www.linux-bulgaria.org/ Hosted by Internet Group Ltd. - Stara Zagora
|