I want to talking about the “awk” command running as a grep or sed .This command is a  pattern scanning and processing, if you can use it as correct while working that contain complex  file, so it can be usefull.Also you can use regular expression while using awk ,  if you need of course.But i recommended to you got to use regex with awk.

Let’s start the review this command step by step to understand whic how to work this.

This command that prints first column in ugur.txt.

[root@rhel6 ~]# awk ‘{print $1}’ ugur.txt
linux
LINUX
ugur
hacker
redhat
rhel
rhellinux
bash
init
OS
architecture

This command that prints first and second columns in ugur.txt. Continue reading

Share on Facebook