I need to run an awk script to detect local maxima(peaks) in a spectrum. This spectrum is in the form of two columns in a text file.
This is part of a larger project
you should be able to do
system('your awk command here')
If you have single quotes in your awk command, either do as Hong Ooi suggests and put your awk command in a separate file and then just run that from the system command or escape the single quotes:
awk
system
> system('echo \'hello guy!\' ') hello guy!