cibalo
May 17th, 2013, 04:02 AM
Hello schragge and trent.josephsen,
Thank you very much for your valuable reply.
Both of your suggestions worked for me.
Now, I have the following outputs.
$ find testing -type f -name "[a-z]*\.txt"
testing/dir.a/dir_b/dir-c/this-is-testing4_org.txt
testing/dir.a/dir_b/dir-c/this_is_testing3_org.txt
$ ls testing/dir.a/dir_b/dir-c/* | perl -ne 'm{^(.*/)([a-z][^/]*)$} && print'
testing/dir.a/dir_b/dir-c/this_is_testing3_org.txt
testing/dir.a/dir_b/dir-c/this-is-testing4_org.txt
$ ls testing/dir.a/dir_b/dir-c/* | perl -MFile::Basename -ne 'print if basename($_) =~ /^[a-z]/'
testing/dir.a/dir_b/dir-c/this_is_testing3_org.txt
testing/dir.a/dir_b/dir-c/this-is-testing4_org.txt
Best Regards,
cibalo
Thank you very much for your valuable reply.
Both of your suggestions worked for me.
Now, I have the following outputs.
$ find testing -type f -name "[a-z]*\.txt"
testing/dir.a/dir_b/dir-c/this-is-testing4_org.txt
testing/dir.a/dir_b/dir-c/this_is_testing3_org.txt
$ ls testing/dir.a/dir_b/dir-c/* | perl -ne 'm{^(.*/)([a-z][^/]*)$} && print'
testing/dir.a/dir_b/dir-c/this_is_testing3_org.txt
testing/dir.a/dir_b/dir-c/this-is-testing4_org.txt
$ ls testing/dir.a/dir_b/dir-c/* | perl -MFile::Basename -ne 'print if basename($_) =~ /^[a-z]/'
testing/dir.a/dir_b/dir-c/this_is_testing3_org.txt
testing/dir.a/dir_b/dir-c/this-is-testing4_org.txt
Best Regards,
cibalo