How to Use Awk to Find and Sort Text in Linux, GnuCash

Posted by Scott_Ruecker on Jun 15, 2013 6:16 AM EDT
Linux.com; By Carla Schroder
Mail this story
Print this story

awk is a splendid Unix scripting language for processing text files. The version included in most Linux distros is GNU awk, or gawk for short. I like it for pulling data from ordered data sets, such as text lists and CSV exports from spreadsheets. awk sees each line in a file as a separate record, and each item in a line as a separate field, which makes it possible to slice and dice your files in all kinds of flexible ways. The classic way to illustrate this is with /etc/passwd; this example prints the whole contents:

Full Story

  Nav
» Read more about: Groups: GNU, Linux; Story Type: News Story

« Return to the newswire homepage

This topic does not have any threads posted yet!

You cannot post until you login.