suekawar has asked for the wisdom of the Perl Monks concerning the following question:
I am trying to chdir to the latest dir with the word PC in the front . so it should be PC_0011814_AVE_RF_1.5 so how can I get to that LATEST directory with only knowing part of the directory name :ls -lrt drwxrwxrwx 2 do ba 96 Feb 10 04:59 PC_03021001_MDS_RF +_job drwxrwxrwx 2 do ba 96 Feb 10 05:02 PC_0011814_AVE_RF_ +1.5 drwxrwxrwx 2 do ba 96 Feb 10 05:12 US_03029_AVE_RF_42 +3.5 drwxrwxrwx 2 do ba 96 Feb 10 05:24 AT_030_DAE_RF_4
thanks for help .. let me know if the question is not clear. thanks againchdir "/diro/col/PC*" or die" can't change";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: greping from lists
by Fletch (Bishop) on Feb 17, 2003 at 16:56 UTC | |
|
Re: greping from lists
by steves (Curate) on Feb 17, 2003 at 17:01 UTC | |
|
Re: greping from lists
by graff (Chancellor) on Feb 17, 2003 at 17:35 UTC | |
by suekawar (Novice) on Feb 17, 2003 at 22:46 UTC |