Notes on Using the Scripts in This Subdirectory The scripts in this subdirectory are examples of post-processing lsof field output. They are written in AWK, Perl 4 (4.036), and Perl 5 (5.001e through 5.006). AWK scripts have a suffix of ``.awk''; Perl 4 (which will work uder Perl 5) scripts have a ``.perl4'' suffix; and Perl 5 scripts, ``.perl''. Supply AWK scripts to your AWK interpreter with its -f option. Supply lsof field output via a pipe -- e.g., lsof -F | awk -f list_fields.awk The Perl scripts use the Unix command interpreter line feature to specify the location of Perl -- i.e., the first line begins with ``#!'' and the path to the Perl interpreter follows. If your system supports the command interpreter feature, but your Perl interpreters have different paths to them, just change the interpreter lines in the scripts. These scripts assume: Path to: Is: ======= == Perl 4 /usr/local/bin/perl4 Perl 5 /usr/local/bin/perl If your system doesn't support the command interpreter feature, you'll have to supply the scripts to your Perl interpreter on its command line -- e.g., lsof -F | / list_fields.perl Some scripts also declare a path to lsof -- e.g., the count_pf.perl* ones -- as ``../lsof'' on the assumption that you'll run them from the scripts subdirectory and that an lsof executable is in ``../lsof''. If those assumptions are incorrect for you, you'll have to modify the scripts. Vic Abell July 14, 2000