Hi folks, Im new to AWK but I have about 150 files that I need to pull about a dozen fields from these comma delimeted files.
When I run the AWK script I wrote I am getting a "has too many fields" error.
The file has a lot of columns (more than 100 columns)
Can any of you experts let me know what the maximum fields allowed in a file is? I edited someone else AWK script so I am pretty sure my script is ok. I'll paste it below.
Any suggestions will be greatly appreciated.
thanks
echo "Please enter the name of the Availability file: \c"
read filename
if [ -f $filename ]
then echo "....accessing file......"
else echo "file doesnt exist"
fi
echo "Please enter the delimiter: \c"
read delimiter
awk -F$delimiter '{print $1, $2, $76, $77, $78, $79, $80, $81, $94, $95, $96, $97, $98, $99}' $filename > pu.data
When I run the AWK script I wrote I am getting a "has too many fields" error.
The file has a lot of columns (more than 100 columns)
Can any of you experts let me know what the maximum fields allowed in a file is? I edited someone else AWK script so I am pretty sure my script is ok. I'll paste it below.
Any suggestions will be greatly appreciated.
thanks
echo "Please enter the name of the Availability file: \c"
read filename
if [ -f $filename ]
then echo "....accessing file......"
else echo "file doesnt exist"
fi
echo "Please enter the delimiter: \c"
read delimiter
awk -F$delimiter '{print $1, $2, $76, $77, $78, $79, $80, $81, $94, $95, $96, $97, $98, $99}' $filename > pu.data