Hi,
I am a newbie to shell scripting. here is my objective:
1)The shell program should take 2 parameters - ie-> DestinationFolder, WebFolder
2)Destination folder contains few files that has to has be verified and deleted.
3)WebFolder is a folder containing a list of master files
4)It should output 3 files - InWebFolder.txt, MalformedMailIDs.txt, NotInWebFolder.txt. THIS IS THE END RESULT
5)For each file in DestinationFolder
- Find if it contains a valid mail ID.
- If no,
- see if there is an "@" in the file. If yes, write the full filename and path in the MalformedMailIDs.txt file
- If there is no "@" symbol, the file is simply to be discarded
- Check if that ID is found in WebFolder.
- If not present, retain the file and put the filename in the NotInWebFolder.txt file
- If present, delete that file and put the full filename in the InWebFolder.txt file
How do i do this. can anyone plz guide me.
thanks in advance