Linux-Bulgaria.ORG
навигация

 

начало

пощенски списък

архив на групата

семинари ...

документи

как да ...

 

 

Предишно писмо Следващо писмо Предишно по тема Следващо по тема По Дата По тема (thread)

Re: lug-bg: grep, sed, cut - output manipulating


  • Subject: Re: lug-bg: grep, sed, cut - output manipulating
  • From: danchev@xxxxxxxxx (George Danchev)
  • Date: Sun, 9 Sep 2001 22:09:55 +0300



On Sunday 09 September 2001 20:54, you wrote:
> lesno i prosto reshenie:
> izpolzwaj perl za da imash poweche "lesen" kontrol.
>
> perl -ne ' chomp; if (m/pattern/) { print $&,"\n"; } '
>
> BR,
> Boyan

tozi perl ne go razbrah, po-to4no nerazbrah kak da "obadq" paterna,
no primerno manipulaciq na dobre  izvestniq output na ifconfig:
(output-vane na IP na edinstveniq ppp interfeis na mashinata, kojto ste 
posluzhi za input na drugo ... i t.n. - pipes)
ifconfig |grep P-t-P: |awk '{print $2}' |cut -c 6-

fashtam reda, posle kolonata , i "izrqzwam" ot 6-ta poziciq natatuk. 
Primera e slu4aen samo za demonstraciq 4e e podhodqst.
Znam 4e i s perl stavat tiq raboti, i e po-mosten ama trea se znae kak da se 
"vpregne" , a az vse oste ne moga da go vprqgam :). 
Kakto i da e s lame scripts susto stava dosta powerful:)

10x 
===========================================================================
A mail-list of Linux Users Group - Bulgaria (bulgarian linuxers)
http://www.linux-bulgaria.org/ Hosted by Internet Group Ltd. - Stara Zagora



 

наши приятели

 

линукс за българи
http://linux-bg.org

FSA-BG
http://fsa-bg.org

OpenFest
http://openfest.org

FreeBSD BG
http://bg-freebsd.org

KDE-BG
http://kde.fsa-bg.org/

Gnome-BG
http://gnome.cult.bg/

проект OpenFMI
http://openfmi.net

NetField Forum
http://netField.ludost.net/forum/

 

 

Linux-Bulgaria.ORG

Mailing list messages are © Copyright their authors.