I have an awk script that I am trying to run from the command prompt and for some reason it errors out at the gsub and sub part.
Here is what I enter on the command line
awk - f /usr/appl/riv/home/testriv/awk/riv_feed_import.awk /usr/appl/riv/home/testriv/data/eagle_ac
and the awk script part where its failing is-
{
# remove trailing spaces
sub(/[ \t]+$/, ""); # set number of placeholders for bcp
myPlaceHolders=substr(OFS_PLACE_HOLDERS,0,NUM_OUTP UT_COLS-NF-1);
# change FS to OFS
reFS = "[\\" FS "]";
gsub(reFS,OFS);
# write out the bcp formatted data feed
print FEED_CD,STAGE_TABLE,$0,myPlaceHolders > FILENAME ".bcp";
}