I have numerous files that need a fold -80 commmand performed for each file and then output to a new file_name for each file.
I would like to include the fold step within awk with the pipe command and fold options along with some other steps for each file.
Is this possible within the awk script?
Here it is. Thanks vlad.
BEGIN {
if (!fn) fn = "polygon_file.dat"
while ((getline < fn) > 0) {
xp[$1]
yp[$2]
}
}
{
x=$3;
y=$4;
for (i = 0; j = npol-1; i < npol; j = i++) {
if ((((yp[i]<=y) && (y<yp[j])) ||
((yp[j]<=y) && (y<yp[i]))) &&...
Thanks for the help.
Here's what I have so far using the c code.
It still needs some help but not sure what to do.
I'm running it by gawk -v fn="polygon_file.dat" -f polygon_edit.gawk data_file.dat
and here's the awk script so far. I only want to print complete records that a xy...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.