use awk to extract all column except first column or speciifed column
Sed & Awk is one of my favorite command when it comes to file data processing using cli.
Here is a simple example in which we want to display all columns but except the first one.
case - want to save output of history command without numeric serial.
$ history | awk '{first = $1; $1 = ""; print $0 }' > history.txt
And done.
Here is a simple example in which we want to display all columns but except the first one.
case - want to save output of history command without numeric serial.
$ history | awk '{first = $1; $1 = ""; print $0 }' > history.txt
And done.
Comments
Post a Comment