I am very new to awk, I am writing my first script that needs to retrieve a log file located at C:\Documents and Settings\All Users\Application Data\Symantec\Norton AntiVirus Corporate Edition\7.5\Logs\${DATE}.Log but I am unable to reteive the file. Any assistance you could offer would be greatly appreciated.
if I list the pathname like:
LOG=${HOME}/Documents\ and\ Settings/All\ Users/Application\ Data/Symantec/Norton\ AntiVirus\ Corporate\ Edition/7.5/Logs/
OR
LOG="C:/Documents\ and\ Settings/All\ Users/Application\ Data/Symantec/Norton\ AntiVirus\ Corporate\ Edition/7.5/Logs/"
it interprets the first space it encounters as the end of the pathname
if I list it as
LOG=`C:/Documents\ and\ Settings/All\ Users/Application\ Data/Symantec/Norton\ AntiVirus\ Corporate\ Edition/7.5/Logs/`
it interprets the path correctly but when it gets to
FILELIST=`find ${LOG} ${DATE}.Log`
it tried to find the ${LOG} then it tries to find the ${DATE}.Log
This is what I am currently seeing when I try and run the script.sh file
$ ./script.sh
+ HOME=C:
+ LOG=C:/Documents and Settings/All Users/Application Data/Symantec/Norton AntiVirus Corporate Edition/7.5/Logs/
+ OUTPUTDIR=C:/Logs
+ YEARS=2005
+ MONTHS=01 02
+ DAYS=01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
+ SERVER=DFW-VirusHist
+ main
++ date +%m%d%Y
+ DATE=02162005
++ find C:/Documents and Settings/All Users/Application Data/Symantec/Norton AntiVirus Corporate Edition/7.5/Logs/ 02162005.Log
find: C:/Documents: No such file or directory
find: and: No such file or directory
find: Settings/All: No such file or directory
find: Users/Application: No such file or directory
find: Data/Symantec/Norton: No such file or directory
find: AntiVirus: No such file or directory
find: Corporate: No such file or directory
find: Edition/7.5/Logs/: No such file or directory
find: 02162005.Log: No such file or directory
+ FILELIST=
+ rm C:/Logs/DFW-VirusHist.csv
+ ./virusreport.awk
if I list the pathname like:
LOG=${HOME}/Documents\ and\ Settings/All\ Users/Application\ Data/Symantec/Norton\ AntiVirus\ Corporate\ Edition/7.5/Logs/
OR
LOG="C:/Documents\ and\ Settings/All\ Users/Application\ Data/Symantec/Norton\ AntiVirus\ Corporate\ Edition/7.5/Logs/"
it interprets the first space it encounters as the end of the pathname
if I list it as
LOG=`C:/Documents\ and\ Settings/All\ Users/Application\ Data/Symantec/Norton\ AntiVirus\ Corporate\ Edition/7.5/Logs/`
it interprets the path correctly but when it gets to
FILELIST=`find ${LOG} ${DATE}.Log`
it tried to find the ${LOG} then it tries to find the ${DATE}.Log
This is what I am currently seeing when I try and run the script.sh file
$ ./script.sh
+ HOME=C:
+ LOG=C:/Documents and Settings/All Users/Application Data/Symantec/Norton AntiVirus Corporate Edition/7.5/Logs/
+ OUTPUTDIR=C:/Logs
+ YEARS=2005
+ MONTHS=01 02
+ DAYS=01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
+ SERVER=DFW-VirusHist
+ main
++ date +%m%d%Y
+ DATE=02162005
++ find C:/Documents and Settings/All Users/Application Data/Symantec/Norton AntiVirus Corporate Edition/7.5/Logs/ 02162005.Log
find: C:/Documents: No such file or directory
find: and: No such file or directory
find: Settings/All: No such file or directory
find: Users/Application: No such file or directory
find: Data/Symantec/Norton: No such file or directory
find: AntiVirus: No such file or directory
find: Corporate: No such file or directory
find: Edition/7.5/Logs/: No such file or directory
find: 02162005.Log: No such file or directory
+ FILELIST=
+ rm C:/Logs/DFW-VirusHist.csv
+ ./virusreport.awk