HI,
AWK program:
echo -n "Enter from date: "
read fromDate
echo -n "Enter to date: "
read toDate
echo -n "Enter log name: "
read log
nawk -v fd="$fromDate" -v td="$toDate" '$0>="[" fd && $0<="[" td "9"' $log
This allows a user to enter a log name, which is then used as the input by the program. But the log is in a different folder called "results".
I have tried "/results/"$log, in the above but it doesnt work. Please can you explain why?
My folder structure is: /steve/awkfolder/results.
My programs live in awkfolder. The log files are in results.
Thanks,
S.
AWK program:
echo -n "Enter from date: "
read fromDate
echo -n "Enter to date: "
read toDate
echo -n "Enter log name: "
read log
nawk -v fd="$fromDate" -v td="$toDate" '$0>="[" fd && $0<="[" td "9"' $log
This allows a user to enter a log name, which is then used as the input by the program. But the log is in a different folder called "results".
I have tried "/results/"$log, in the above but it doesnt work. Please can you explain why?
My folder structure is: /steve/awkfolder/results.
My programs live in awkfolder. The log files are in results.
Thanks,
S.