[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
RE: Find and copy script/piped command
- From: "Lawrence Kirby" <lawrence netactive co uk>
- To: <redhat-install-list redhat com>
- Subject: RE: Find and copy script/piped command
- Date: Fri, 31 Oct 2003 10:42:53 -0000
bdegan ticnet com wrote
>You could do:
>
>find /tmp -mtime -1 -exec bkup.sh {} \;
>
>and then the bkup.sh script could do something like:
>
>
>if [ -f $1 ] ; then
> file=`echo $1 | awk '{n=split($0,AR, "/");print AR[n] }'`
> cp -v $1 /tmp/backup/$file
>fi
You could use the basename command here.
Lawrence
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]