The awk Utility

An introduction to the Linux data manipulation tool called awk.

Scripting languages and specialty tools that allow rapid development have been widely accepted for quite some time. Both awk and sed deserve a spot on any Linux developer's and administrator's workbench. Both tools are a standard part of any Linux platform. Together, awk and sed can be used to implement virtually any text filtering application—such as perform repetitive edits to data streams and files and generate formatted reports.

The most current reference book for both awk and sed is the O'Reilly release awk and sed by Dale Dougherty and Arnold Robbins. Also see Effective AWK Programming by Arnold Robbins (SSC). For an immediate on-line synopsis on your Linux system, use the man command as follows:

I hope the information provided here is useful and encourages you to begin or expand your use of these tools. If you exploit what awk and sed offer, you will most certainly save development time and money. Those who know how to quickly apply sharp tools to seemingly complex problems are handsomely rewarded in our field.

Louis Iacona ( has been designing and developing software systems since 1982 on UNIX/Linux and other platforms. Most recently, his efforts have focused on applying World Wide Web technologies to client/server development projects. He currently manages the Internet development group at ICP in Staten Island, N.Y.



Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Re: Take Command: The awk Utility

DrScriptt's picture

Hat's off to you Louis. You have yet another very well written and informative article. I have often wondered about messing with awk to see exactly what it is and what it could do for me. Again, (L.J. Admin's are you reading this?) I really like this type of article. It gives me enough information to see what a tool is and what it is capable of and how to go about playing with it. I really like the example code. I can sh in and test the code that is presented with out any problems.

Keep up the good work. :)


I have to say 'Hat's off to

Anonymous's picture

I have to say 'Hat's off to you Louis' !!!. Nice article ..well written, simple and very very informative . Thanx a ton !

White Paper
Linux Management with Red Hat Satellite: Measuring Business Impact and ROI

Linux has become a key foundation for supporting today's rapidly growing IT environments. Linux is being used to deploy business applications and databases, trading on its reputation as a low-cost operating environment. For many IT organizations, Linux is a mainstay for deploying Web servers and has evolved from handling basic file, print, and utility workloads to running mission-critical applications and databases, physically, virtually, and in the cloud. As Linux grows in importance in terms of value to the business, managing Linux environments to high standards of service quality — availability, security, and performance — becomes an essential requirement for business success.

Learn More

Sponsored by Red Hat

White Paper
Private PaaS for the Agile Enterprise

If you already use virtualized infrastructure, you are well on your way to leveraging the power of the cloud. Virtualization offers the promise of limitless resources, but how do you manage that scalability when your DevOps team doesn’t scale? In today’s hypercompetitive markets, fast results can make a difference between leading the pack vs. obsolescence. Organizations need more benefits from cloud computing than just raw resources. They need agility, flexibility, convenience, ROI, and control.

Stackato private Platform-as-a-Service technology from ActiveState extends your private cloud infrastructure by creating a private PaaS to provide on-demand availability, flexibility, control, and ultimately, faster time-to-market for your enterprise.

Learn More

Sponsored by ActiveState