Ask a Question related to Linux / Unix Administration, Design and Development.
-
Louis #1
shell script help!!
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 [email]hello@hotmail.com[/email]
how can i do it?
thanks
Louis Guest
-
Shell script question
Hi, I am trying to run one of my installation shell script using the command- bash resetapp.sh & it gives me the error as- 'bash: not... -
Shell Script Examples
On 3 Feb 2004 02:51:42 -0800, sysera wrote: This is for bash, but is kinda close to ksh. http://www.tldp.org/LDP/abs/html/index.html... -
How do i include a shell script
How do i include a shell script in perl. I have to use some shell scripts in a perl script. I know I can write it in perl, but would like avoid... -
shell script with different results
I'd like to get an IP address from network. See the following line. I'd received the correct address if I start the script from root/shell but... -
Execute shell script from a perl script
Hi, How can I executed a Unix shell script from a Perl script. The shell script is a dump of a oracle table to a file. The perl script is for... -
Michael Heiming #2
Re: shell script help!!
-----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 [email]hello@hotmail.com[/email]find . -mtime -6 -name '*.zip' | tar -cvzf files.tar.gz -T -> how can i do it?
Now pipe files.tar.gz via uuencode to mail.
--
Michael Heiming (GPG-Key ID: 0xEDD27B94)
mail: echo [email]zvpunry@urvzvat.qr[/email] | perl -pe 'y/a-z/n-za-m/'
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQFBHH7fAkPEju3Se5QRAn0xAKCvaXNLZGnoaxwhRBwZf7 7GJVjAKgCfYT+b
fEYpa4T/4UaBkoVy8JcM3ZI=
=hXMt
-----END PGP SIGNATURE-----
Michael Heiming Guest
-
Dana French #3
Re: shell script help!!
Michael Heiming <michael+USENET@www.heiming.de> wrote in message news:<0gbuu1-oih.ln1@news.heiming.de>...
tar -cvf - $( find /directory -mtime -6 -name \*.zip -print ) |> -----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 [email]hello@hotmail.com[/email]>> > 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.
>
compress -c | uuencode zipfiles.tar.Z | mail -s "zip files"
[email]hello@hotmail.com[/email]
Or use "gzip -c " to compress and change the uuencoded file extension
to "tar.gz"
--------------------------------------------------------
Dana French [email]dfrench@mtxia.com[/email]
Mt Xia Technical Consulting Group [url]http://www.mtxia.com[/url]
100% Spam Free Email [url]http://www.ridmail.com[/url]
MicroEmacs [url]http://uemacs.tripod.com[/url]
Korn Shell Web [url]http://dfrench.tripod.com/kshweb.html[/url]
Dana French Guest
-
Louis #4
Re: shell script help!!
thanks all, so seems zip/gzip all files into one and then uuencode it
is the only solution instead of multiple attachment.
[email]dfrench@mtxia.com[/email] (Dana French) wrote in message news:<3fa52bda.0408130751.4690c501@posting.google. com>...> 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 [email]hello@hotmail.com[/email]>> >> > > 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"
> [email]hello@hotmail.com[/email]
>
> Or use "gzip -c " to compress and change the uuencoded file extension
> to "tar.gz"
>
>
>
> --------------------------------------------------------
> Dana French [email]dfrench@mtxia.com[/email]
> Mt Xia Technical Consulting Group [url]http://www.mtxia.com[/url]
> 100% Spam Free Email [url]http://www.ridmail.com[/url]
> MicroEmacs [url]http://uemacs.tripod.com[/url]
> Korn Shell Web [url]http://dfrench.tripod.com/kshweb.html[/url]Louis Guest
-
jpd #5
Re: shell script help!!
On 2004-08-14, Louis <louiskkchan@hotmail.com> wrote:
[snip: please don't top-post. see rfc1855]> thanks all, so seems zip/gzip all files into one and then uuencode it
> is the only solution instead of multiple attachment.
Certainly not. You could use shar to create a ``sharchive''. You could
use mime tools to create a multipart mime message from the commandline.
tar(+gzip or bzip2) or zip and then uuencode, however, is one of the
easiest to implement. And having a compression step seems like a good
idea to keep the message size down.
--
j p d (at) d s b (dot) t u d e l f t (dot) n l .
jpd Guest
-
Louis #6
Re: shell script help!!
jpd <read_the_sig@do.not.spam.it> wrote in message news:<1092479271.657815@entelocal.ipberlin.com>...
umm... i could be able to send "(uuencode a.zip; uuencode b.zip;> Certainly not. You could use shar to create a ``sharchive''. You could
> use mime tools to create a multipart mime message from the commandline.
> tar(+gzip or bzip2) or zip and then uuencode, however, is one of the
> easiest to implement. And having a compression step seems like a good
> idea to keep the message size down.
uuencode c.zip) | mail [email]myemail@here.com[/email]" to Notes server and this mail
with multiple attachment could be viewed probably under Notes.
in fact, those files zipped already. so zip it once again help on
'uuencode'
Louis Guest
-
Kevin Rodgers #7
Re: shell script help!!
Louis wrote:
That may be true, but those uuencoded files are not attachments since> umm... i could be able to send "(uuencode a.zip; uuencode b.zip;
> uuencode c.zip) | mail [email]myemail@here.com[/email]" to Notes server and this mail
> with multiple attachment could be viewed probably under Notes.
the mail command does not generate the appropriate MIME headers to
identify them as such.
Huh?> in fact, those files zipped already. so zip it once again help on
> 'uuencode'
--
Kevin Rodgers
Kevin Rodgers Guest
-
Louis #8
Re: shell script help!!
Kevin Rodgers <ihs_4664@yahoo.com> wrote in message news:<4120EC13.9060302@yahoo.com>...
fyi, Notes is able to view it and detach it.> That may be true, but those uuencoded files are not attachments since
> the mail command does not generate the appropriate MIME headers to
> identify them as such.
Louis Guest
-
Alan Connor #9
Re: shell script help!!
On 17 Aug 2004 23:11:35 -0700, Louis <louiskkchan@hotmail.com> wrote:
Why not? Easy enough to scan the body and make a guess as to the file type,>
>
> Kevin Rodgers <ihs_4664@yahoo.com> wrote in message news:<4120EC13.9060302@yahoo.com>...
>>>> That may be true, but those uuencoded files are not attachments since
>> the mail command does not generate the appropriate MIME headers to
>> identify them as such.
> fyi, Notes is able to view it and detach it.
if not ascertain it for sure.
Notes (which I've never heard of) determines that the body is a uuencoded
jpeg (for example) and decodes it and sends it to a viewer.
AC
Alan Connor Guest
-
Louis #10
Re: shell script help!!
oh... u don't know Lotus Notes [url]http://www-306.ibm.com/software/lotus/[/url] ??
"Alan Connor" <zzzzzz@xxx.yyy> wrote in message
news:EyCUc.26508$9Y6.1979@newsread1.news.pas.earth link.net...> Notes (which I've never heard of) determines that the body is a uuencoded
> jpeg (for example) and decodes it and sends it to a viewer.
>
> AC
>
>
Louis Guest



Reply With Quote

