in reply to Remove text after and before
Perhaps like this?
knoppix@Microknoppix:~$ perl -E ' > $input = <<EOI; > 2: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast + state UP qlen 1000 link/ether 00:0c:29:4e:97:a1 brd ff:ff:ff:ff:ff:f +f > EOI > > $eth = ( split m{\s*:\s*}, $input )[ 1 ]; > say qq{->$eth<-};' ->eth1<- knoppix@Microknoppix:~$
Cheers,
JohnGG
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Remove text after and before
by muizelaar (Sexton) on May 22, 2012 at 10:51 UTC |