hi all,
i have a big problem with my gawk. the programm is installed, i guess, because it works, when i'm using command line gawk.
now, i want to process more than one file in the same way and therefor, i want to write a script file.
the script looks like:
#! /usr/bin/gawk -f
set infile (i don't know, how to set more than one file e.g. *txt)
set outfile (how to use the first part of the infile and using a new ending e.g. *dat)
BEGIN {printf"%10.6f\t%10.6f\t%10.3f\t%10.3f\t%10.3f\t%10.3f\n", \
$1, $2, $3, $4, $5, sqrt($5*$5)}' infile > outfile
the script is executable (sudo chmod +x script).
i'm typing only the name of the script in the command line and nothing happens...no error, nothing.
can anyboby help me??
i have a big problem with my gawk. the programm is installed, i guess, because it works, when i'm using command line gawk.
now, i want to process more than one file in the same way and therefor, i want to write a script file.
the script looks like:
#! /usr/bin/gawk -f
set infile (i don't know, how to set more than one file e.g. *txt)
set outfile (how to use the first part of the infile and using a new ending e.g. *dat)
BEGIN {printf"%10.6f\t%10.6f\t%10.3f\t%10.3f\t%10.3f\t%10.3f\n", \
$1, $2, $3, $4, $5, sqrt($5*$5)}' infile > outfile
the script is executable (sudo chmod +x script).
i'm typing only the name of the script in the command line and nothing happens...no error, nothing.
can anyboby help me??