while read LINE
do
echo $LINE | awk '{FS=":"} {print $1" " $2" " $3}' | read DIR FILEN
OLD
EDIR=$(eval echo $DIR)
[ ! -d $EDIR -o ! -w $EDIR ] && continue
find $EDIR -type f -name "$FILEN" -mtime +$OLD -exec ls {} \;
find $EDIR -type f -name "$FILEN" -mtime +$OLD -exec rm -f {} \;
done < $SCRIPTS_DIR/etc/mftab
if i wont to change rm -f with cp -p
Re: exec in ksh
am 22.11.2007 20:29:26 von Barry Margolin
In article ,
Patrick wrote:
> Hi,
> my script:
>
> while read LINE
> do
> echo $LINE | awk '{FS=":"} {print $1" " $2" " $3}' | read DIR FILEN
> OLD
> EDIR=$(eval echo $DIR)
> [ ! -d $EDIR -o ! -w $EDIR ] && continue
> find $EDIR -type f -name "$FILEN" -mtime +$OLD -exec ls {} \;
> find $EDIR -type f -name "$FILEN" -mtime +$OLD -exec rm -f {} \;
> done < $SCRIPTS_DIR/etc/mftab
>
> if i wont to change rm -f with cp -p
Re: exec in ksh
am 22.11.2007 21:16:38 von gazelle
In article ,
Barry Margolin wrote:
....
>find ... -exec cp -p {} dest \;
>
>BTW, it would be nice if the Subject actually described the post? I see
>no use of exec in your script. Your question is about find.
'exec' as a find option.
Re: exec in ksh
am 23.11.2007 09:57:16 von patrick
On 22 Nov, 21:16, gaze...@xmission.xmission.com (Kenny McCormack)
wrote:
> In article ,
> Barry Margolin wrote:
> ...
>
> >find ... -exec cp -p {} dest \;
>
> >BTW, it would be nice if the Subject actually described the post? I see
> >no use of exec in your script. Your question is about find.
>
> 'exec' as a find option.