O'Reilly logo

Learning AWK Programming by Shiwang Kalkhanda

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using the command line to set the FS as -F

We can also define the FS on the command line using option -F. For example:

$ awk -F":" '{print $1}' /etc/passwd

The output of the execution of this command is as follows:

rootdaemonbinsyssyncgamesmanlpmailnewsuucpnobody.........

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required