Re: shell script help!!
From: Dana French (dfrench_at_mtxia.com)
Date: 08/13/04
- Previous message: Michael Heiming: "Re: shell script help!!"
- In reply to: Michael Heiming: "Re: shell script help!!"
- Next in thread: Louis: "Re: shell script help!!"
- Reply: Louis: "Re: shell script help!!"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 13 Aug 2004 08:51:06 -0700
Michael Heiming <michael+USENET@www.heiming.de> wrote in message news:<0gbuu1-oih.ln1@news.heiming.de>...
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> NotDashEscaped: You need GnuPG to verify this message
>
> In comp.unix.shell Louis <louiskkchan@hotmail.com> suggested:
> > hi all,
>
> > i have some commands on hand, but i don't know how i can stick it up
> > with (ksh) shell script... can anyone help?
>
> > 1) use find to list out last 6 modified day files, *.zip
> > find /directory -mtime -6 -name '*.zip'
> > 2) name of file is unknown, but i need to make up the following
> > command so i could attach all files and send it out into one email
> > (uuencode $1 `basename $1`; uuencode $2 `basename $2`..... uuencode $X
> > `basename $1X`) | mail hello@hotmail.com
>
> > how can i do it?
>
> find . -mtime -6 -name '*.zip' | tar -cvzf files.tar.gz -T -
>
> Now pipe files.tar.gz via uuencode to mail.
>
tar -cvf - $( find /directory -mtime -6 -name \*.zip -print ) |
compress -c | uuencode zipfiles.tar.Z | mail -s "zip files"
hello@hotmail.com
Or use "gzip -c " to compress and change the uuencoded file extension
to "tar.gz"
--------------------------------------------------------
Dana French dfrench@mtxia.com
Mt Xia Technical Consulting Group http://www.mtxia.com
100% Spam Free Email http://www.ridmail.com
MicroEmacs http://uemacs.tripod.com
Korn Shell Web http://dfrench.tripod.com/kshweb.html
- Previous message: Michael Heiming: "Re: shell script help!!"
- In reply to: Michael Heiming: "Re: shell script help!!"
- Next in thread: Louis: "Re: shell script help!!"
- Reply: Louis: "Re: shell script help!!"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|