What Will This Return?
- From: "Will" <wisaunders@xxxxxxxxx>
- Date: 29 Mar 2007 10:58:55 -0700
I do not have a UNIX enviroment to test in and I am a windows
developer. Please help me with this simple question.
Thanks,
Will
NonEmptyFiles=$( find /usr/edit/*.phy -type f -size +0 )
If I have two files (/usr/edit/01.phy & /usr/edit/02.phy)
If I execute the statement above from user/bin will it return:
/usr/edit/01.phy
/usr/edit/02.phy
OR
01.phy
02.phy
So later when I refernce the files from user/bin do i need to do this:
for EachFile in $NonEmptyFiles
do
TimeStamp=`date "+%Y%m%d%H%M"`
cp $EachFile $EachFile$TimeStamp.dat
done
OR
for EachFile in $NonEmptyFiles
do
TimeStamp=`date "+%Y%m%d%H%M"`
cp /usr/edit/$EachFile /usr/edit/$EachFile$TimeStamp.dat
done
.
- Follow-Ups:
- Re: What Will This Return?
- From: Bill Marcum
- Re: What Will This Return?
- Prev by Date: Re: Using GNU sed to delete a block of consecutive lines
- Next by Date: Re: line processing slow
- Previous by thread: Variable substitution rescan
- Next by thread: Re: What Will This Return?
- Index(es):
Relevant Pages
|
|