iI have an awk script and iI have passed csva CSV file to it.
awk -f script.awk /home/abc/imp/asgd.csv What am iI doing is to get FILENAME within scriptscript.awk.awk,FILENAME give FILENAME gives me the whole path.As i As I am in awk iI cannot use basename FILENAME.
print FILENAME; /home/abc/imp/asgd.csv iI have tried with this within awk script.awkscript.awk
echo $FILENAME | awk -F"/" '{print $NF}' but I cannot execute this within script.awk,any help ,howscript.awk. How can iI get asgd.csvasgd.csv within an awk program,thanks.?