[ale] searching for files....

Jim Popovitch yahoo at jimpop.com
Wed Jun 4 17:37:02 EDT 2008


On Wed, Jun 4, 2008 at 4:59 PM, James Sumners <james.sumners at gmail.com> wrote:
> Maybe something similar to this bash script (which I think will work):
>
> files=`ls -1A`
> for f in $files; do
>    [ -f $f ]
>        [ -e subdir/$f ] echo "subdir/$f.data exists"
> done

Well that seems like it would select all files (blah and blah.data),
then check each file for an existing .data "relative".   I need to
locate one or more "blah.data" files that don't have a coresponding
"blah" counterpart.

For reference, here is a short listing of files:

aaa-bbb-ccc
aaa-bbb-ccc.data
ddd-eee-fff
ggg-hhh-iii
ggg-hhh-iii.data

I want to locate ddd-eee-fff and check (via a whole other command) for
"validity"... and I would like to do this all from a single cronjob
line...without executing a shell script. ;-)

-Jim P.


More information about the Ale mailing list