Mombu the Programming Forum

Go Back   Mombu the Programming Forum > Programming > TOO SLOW: `echo ${LINE} | sed -n 's/^.* proto //p' | cut -f1 -d" "`
User Name
Password
REGISTER NOW! Mark Forums Read




Reply
1 6th October 15:16
carltonbrown
External User
 
Posts: 1
Default TOO SLOW: `echo ${LINE} | sed -n 's/^.* proto //p' | cut -f1 -d" "`



while (<INPUTFILE>) {
@pname = $_ =~ /proto\s+(\w+)/;
print "I found a protocol named: $pname[0]\n";
}

This works if you've correctly specified your file handles. That,
along with any customizations that you may consider asking about next,
are intentionally left blank as an opportunity for self-study.
  Reply With Quote


 


Reply


Thread Tools
Display Modes




666