Jun 15, 2004 #1 dvknn IS-IT--Management Mar 11, 2003 94 US Hi, The format of the file is: fileNameDD-MMM-YYYY.txt. For example : Sample15-JUN-2004.txt Thanks
Jun 15, 2004 Thread starter #3 dvknn IS-IT--Management Mar 11, 2003 94 US OK...Sorry folks.. How can I test if a file in the format fileNameDD-MMM-YYYY.txt exists?? for ex: SampleDD-MMM-YYYY.txt Upvote 0 Downvote
OK...Sorry folks.. How can I test if a file in the format fileNameDD-MMM-YYYY.txt exists?? for ex: SampleDD-MMM-YYYY.txt
Jun 15, 2004 #4 PHV MIS Nov 8, 2002 53,708 FR Something like this ? ls *[0-3][0-9]-[A-Z][A-Z][A-Z]-[12][90][0-9][0-9].txt Hope This Helps, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244 Upvote 0 Downvote
Something like this ? ls *[0-3][0-9]-[A-Z][A-Z][A-Z]-[12][90][0-9][0-9].txt Hope This Helps, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
Jun 15, 2004 #5 guggach Programmer Jun 10, 2004 159 CH assuming DD and YYYY are digit, MMM characters ls|sed -ne '/Sample[0-3][0-9]-[A-z][A-z][A-z]-[0-9][0-9][0-9][0-9]\.txt/p' guggach Upvote 0 Downvote
assuming DD and YYYY are digit, MMM characters ls|sed -ne '/Sample[0-3][0-9]-[A-z][A-z][A-z]-[0-9][0-9][0-9][0-9]\.txt/p' guggach