www.delorie.com/gnu/docs/gawk/gawk_190.html   search  
Buy the book!

The GNU Awk User's Guide

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

14.1 Running the Example Programs

To run a given program, you would typically do something like this:

awk -f program -- options files

Here, program is the name of the awk program (such as `cut.awk'), options are any command-line options for the program that start with a `-', and files are the actual data files.

If your system supports the `#!' executable interpreter mechanism (see section Executable awk Programs), you can instead run your program directly:

cut.awk -c1-8 myfiles > results

If your awk is not gawk, you may instead need to use this:

cut.awk -- -c1-8 myfiles > results

  webmaster   donations   bookstore     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003