Re: bash scripting help

2007-09-13 Thread chitti
thank you very much Stephane CHAZELAS-3 wrote: > > 2007-09-12, 10:00(-07), chitti: >> >> I need to seperate the UDP and TCP ports from the /etc/services files. >> any pointers or help on scripting this in bash would be helpful >> thanks > > awk ' > NF == 0 || $1 ~ /^#/ {next} > $2 ~ /\/tcp$

Re: bash scripting help

2007-09-12 Thread Stephane CHAZELAS
2007-09-12, 10:00(-07), chitti: > > I need to seperate the UDP and TCP ports from the /etc/services files. > any pointers or help on scripting this in bash would be helpful > thanks awk ' NF == 0 || $1 ~ /^#/ {next} $2 ~ /\/tcp$/ {print > "services.tcp"; next} $2 ~ /\/udp$/ {print > "service

Re: bash scripting help

2007-09-12 Thread Bob Proulx
chitti wrote: > I need to seperate the UDP and TCP ports from the /etc/services files. > any pointers or help on scripting this in bash would be helpful Open ended questions such as that are not the greatest way to get going. It is better if you read one of the many tutorials and howtos that are