Home > Tech stuff > Awk

Awk

Processing delimited sentences in a file

awk -F':' '{ print $1 }' <filename>

Multiple lines into a single line using awk

ps -ef | grep sqlplus | cut -d'' -f2 |awk '{x=x" "$1} END {print x}'
Categories: Tech stuff Tags:
  1. No comments yet.
  1. No trackbacks yet.

Leave a comment