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.

Comments

Popular posts from this blog

using libguestfs virt-customize tool to modify qcow2 image and reset root password.

Running cockpit behind nginx reverse proxy with nginx ssl and cockpit non ssl

setting up openshift alert manager mail alerting based on critical and warning