I am requesting, through AWK, for the operator to enter a filename:
Ans = 0
BEGIN {while (Ans == 0) {
{printf "Enter file Name: "
getline name < "-"
}
{printf "This is the name you entered: "
print name
printf "Is that correct? 1, 0 "
getline Ans < "-"
print Ans
}
}
etc..
How do I check if the file exists in the current directory before I operate on it so my progaram won't crash?
Thanks
Ans = 0
BEGIN {while (Ans == 0) {
{printf "Enter file Name: "
getline name < "-"
}
{printf "This is the name you entered: "
print name
printf "Is that correct? 1, 0 "
getline Ans < "-"
print Ans
}
}
etc..
How do I check if the file exists in the current directory before I operate on it so my progaram won't crash?
Thanks