- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Script help
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2002 07:31 AM
04-23-2002 07:31 AM
#!/usr/bin/sh
DIR2SRCH="/playpen/td"
FILE2FIND="td*.txt"
EXCLUDEDIRS='-e \/old\/ -e \/data\/'
file=" "
filecheck=" "
filecheck=`find ${DIR2SRCH} -type f -name "${FILE2FIND}" -size +0c -exec ls -l {} \; |grep -v ${EXCLUDEDIRS} |cut -c71-90`
if [ -z "$filecheck" ]
then
exit
else
find ${DIR2SRCH} -type f -name "${FILE2FIND}" -size +0c -exec ls -l {} \; |grep -v ${EXCLUDEDIRS} |cut -c71-90|mailx -s "Files arrive" email address
for file in `find ${DIR2SRCH} -type f -name "${FILE2FIND}" -size +0c -exec ls -l {} \; |grep -v ${EXCLUDEDIRS} |cut -c71-90`
do
mv /playpen/td/$file /playpen/td/data/$file
done
fi
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2002 07:35 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2002 07:37 AM
04-23-2002 07:37 AM
Re: Script help
This is from the man page:
To encode and send a compiled program foo to user friend:
uuencode foo foo | mailx -s 'new program' friend
After receiving the mail message, user friend can decode the program
by first saving the message in a file foo.mail and executing the
command:
uudecode foo.mail
Hope this help,
Justo.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2002 07:40 AM
04-23-2002 07:40 AM
Re: Script help
Would add something like
uuencode $FILE2FIND | mailx -s "subject_line" user@domain.com
OR
mailx -s "subject_line" user@domain.com < uuencode $FILE2FIND
HTH,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2002 07:58 AM
04-23-2002 07:58 AM
Re: Script help
(
echo "From:
echo "To:
echo "Subject:
echo "This is the body of the e-mail.
If you are having any problem with this file please give us a call.
/usr/bin/uuencode /local/filename filename
) | /usr/sbin/sendmail user@company.com
Hai
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2002 08:11 AM
04-23-2002 08:11 AM
Re: Script help
uuencode $filecheck | mailx -s "subject_line" user@domain.com
I am getting this in email
begin 0 tdmgw.ret.txt
.=&1M9W
end
The email will go to window or NT system, Can someone put the light here
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2002 08:22 AM
04-23-2002 08:22 AM
Re: Script help
This is because you must put:
uuencode $filecheck $filecheck| mailx -s "subject_line" user@domain.com
Regards,
Justo.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2002 08:24 AM
04-23-2002 08:24 AM
Re: Script help
Yep Justo is correct.
Sorry I left out the output filename in the uuencode command.
Rgds,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2002 08:25 AM
04-23-2002 08:25 AM
Re: Script help
I forgot to tell you that perhaps you need to change the file format from HP/UX to DOS format, to do this you need the command ux2dos
see the man page.
Regards,
Justo.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2002 08:27 AM
04-23-2002 08:27 AM
Re: Script help
After doing uuencode $filecheck $filecheck |mailx -s "files arrive" email, i am getting this now
begin 644 tdmgw.ret.txt
M8V%T('-P:&EN>"YP87-S=V0@?'-O
`
end
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2002 08:31 AM
04-23-2002 08:31 AM
Re: Script help
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x859903bbece8d5118ff40090279cd0f9,00.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2002 08:39 AM
04-23-2002 08:39 AM
Re: Script help
Can you try to do with a simple ascii file?
I just tried with a simple ascii file called probe and it work fine between my HP/UX and my NT with outlook.
uuencode probe probe |mailx -s 'hello' myuser@mydomain.es
If you try it and all it's good then you can put the right sentence in your complex script.
Regards,
Justo.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2002 10:04 AM
04-23-2002 10:04 AM
Re: Script help
You need a -m flag for mailx to send it as an attachment ...
check the man pages for mailx
uuencode filename filename | mailx -m -s "subject" abc@abc.com
Thanks,
Shabu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2002 02:55 AM
04-24-2002 02:55 AM
Re: Script help
On my side, I'm using another tool called 'nail' which create mime attachment.
You can download it at
http://hpux.cs.utah.edu/hppd/hpux/Networking/Mail/nail-9.30/
syntax is quite the same as mail and is very easy to use.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2002 08:34 AM
04-24-2002 08:34 AM
Re: Script help
This works?
This is closed?
Regards,
Justo.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-25-2002 05:16 AM
04-25-2002 05:16 AM
Re: Script help
ux2dos $filecheck > convertfile
uuencode convertfile convertfile|mailx -m -s "files arrive" emailadd.
Can someone help how to attach multiples files
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-25-2002 05:22 AM
04-25-2002 05:22 AM
Re: Script help
#!/usr/bin/sh
DIR2SRCH="/playpen/td"
FILE2FIND="td*.txt"
EXCLUDEDIRS='-e \/old\/ -e \/data\/'
file=" "
filecheck=" "
filecheck=`find ${DIR2SRCH} -type f -name "${FILE2FIND}" -size +0c -exec ls -l {} \; |grep -v
${EXCLUDEDIRS} |cut -c71-90`
if [ -z "$filecheck" ]
then
exit
us2doc $filecheck > convertfile else
find ${DIR2SRCH} -type f -name "${FILE2FIND}" -size +0c -exec ls -l {} \; |grep -v
${EXCLUDEDIRS} |cut -c71-90|uuencode convertfile convertfile|mailx -m -s "Files arrive" email address
for file in `find ${DIR2SRCH} -type f -name "${FILE2FIND}" -size +0c -exec ls -l {} \; |grep -v
${EXCLUDEDIRS} |cut -c71-90`
do
mv /playpen/td/$file /playpen/td/data/$file
done
fi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-25-2002 06:16 AM
04-25-2002 06:16 AM
Re: Script help
I think that you must zip your files in one and then use uuencode, there are a free pkzip software for HP/UX in this page:
http://hpux.connect.org.uk/hppd/hpux/
Best Regards,
Justo.