Hi,
I am using getline to check whether input file is available or not.
The following is working fine:
Input file name: file<ym>
read -p "Enter month : " ym
awk 'BEGIN{
but when i use the variable within awk its not working
awk 'BEGIN{
month=202303
Please help
Thank you
I am using getline to check whether input file is available or not.
The following is working fine:
Input file name: file<ym>
read -p "Enter month : " ym
awk 'BEGIN{
print getline < "file'$ym'" <0 ? "Not Available" : "Available"
}'but when i use the variable within awk its not working
awk 'BEGIN{
month=202303
print getline < "file"month <0 ? "Not Available" : "Available"
}'Please help
Thank you