How do I represent "the file previous to this one" in Korn Shell?
November 22, 2005 5:09 PM
Subscribe
Korn Shell Filter: I have a list of time ordered files, with Julian day of year as part of the filename. There is not a file for every Julian day. If I grep on a directory listing for file *{DOY}*, and that file does not exist, I would like my script to be smart enough to use the file immediately preceding it in the listing, even if the preceding file is not *{DOY-1}*. My Google-Fu has failed me. Any suggestions?
posted by Fat Guy to computers & internet (9 comments total)
Personally I'd probably use a more advanced scripting language.
posted by RustyBrooks at 5:40 PM on November 22, 2005