Running AWKscripts from the Command Line in a Terminal WindowActually the first step is to create or edit the text input file for the specific awkscript you are going to run, using a simple text editor (gedit, kedit, whatever). Note that this is not the awkscript itself, it is the input file that the script will read in. That window will look something like this..... ![]() Save the edited file to the same folder the awkscript is in. Then open a terminal window on your desktop. This can usually be done from your desktop's main toolbar, something like APPLICATIONS > ACCESSORIES > TERMINAL. In the terminal window, cd into the folder that contains the awkscript and the input file you just edited. Type in this command.... The awk output will be written to the screen, and it will look something like this...... ![]() If you want the output written to a file, rather than the screen, use this command .... awk -f awkscriptname inputfilename > outputfilenameThe output file, when opened in a text editor will look like this.... ![]() The awkscript file in this case is here. |