<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Script help in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2709285#M60104</link>
    <description>Hi Guys, I have written the following script to check in directory for the files and email the user that files arrive with the files name and mv the files to different directory, Now what I want is to attach the same file with the email, Can someone help me out, here's the script.......&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;DIR2SRCH="/playpen/td" &lt;BR /&gt;FILE2FIND="td*.txt" &lt;BR /&gt;EXCLUDEDIRS='-e \/old\/ -e \/data\/'&lt;BR /&gt;file=" "&lt;BR /&gt;filecheck=" "&lt;BR /&gt;filecheck=`find ${DIR2SRCH} -type f -name "${FILE2FIND}" -size +0c -exec ls -l {} \; |grep -v ${EXCLUDEDIRS} |cut -c71-90`&lt;BR /&gt;if [ -z "$filecheck" ]&lt;BR /&gt;then&lt;BR /&gt;exit&lt;BR /&gt;else&lt;BR /&gt;find ${DIR2SRCH} -type f -name "${FILE2FIND}" -size +0c -exec ls -l {} \; |grep -v ${EXCLUDEDIRS} |cut -c71-90|mailx -s "Files arrive" email address &lt;BR /&gt;for file in `find ${DIR2SRCH} -type f -name "${FILE2FIND}" -size +0c -exec ls -l {} \; |grep -v ${EXCLUDEDIRS} |cut -c71-90`&lt;BR /&gt;do&lt;BR /&gt;mv /playpen/td/$file /playpen/td/data/$file&lt;BR /&gt;done&lt;BR /&gt;fi&lt;BR /&gt;</description>
    <pubDate>Tue, 23 Apr 2002 14:31:03 GMT</pubDate>
    <dc:creator>Anthony khan</dc:creator>
    <dc:date>2002-04-23T14:31:03Z</dc:date>
    <item>
      <title>Script help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2709285#M60104</link>
      <description>Hi Guys, I have written the following script to check in directory for the files and email the user that files arrive with the files name and mv the files to different directory, Now what I want is to attach the same file with the email, Can someone help me out, here's the script.......&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;DIR2SRCH="/playpen/td" &lt;BR /&gt;FILE2FIND="td*.txt" &lt;BR /&gt;EXCLUDEDIRS='-e \/old\/ -e \/data\/'&lt;BR /&gt;file=" "&lt;BR /&gt;filecheck=" "&lt;BR /&gt;filecheck=`find ${DIR2SRCH} -type f -name "${FILE2FIND}" -size +0c -exec ls -l {} \; |grep -v ${EXCLUDEDIRS} |cut -c71-90`&lt;BR /&gt;if [ -z "$filecheck" ]&lt;BR /&gt;then&lt;BR /&gt;exit&lt;BR /&gt;else&lt;BR /&gt;find ${DIR2SRCH} -type f -name "${FILE2FIND}" -size +0c -exec ls -l {} \; |grep -v ${EXCLUDEDIRS} |cut -c71-90|mailx -s "Files arrive" email address &lt;BR /&gt;for file in `find ${DIR2SRCH} -type f -name "${FILE2FIND}" -size +0c -exec ls -l {} \; |grep -v ${EXCLUDEDIRS} |cut -c71-90`&lt;BR /&gt;do&lt;BR /&gt;mv /playpen/td/$file /playpen/td/data/$file&lt;BR /&gt;done&lt;BR /&gt;fi&lt;BR /&gt;</description>
      <pubDate>Tue, 23 Apr 2002 14:31:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2709285#M60104</guid>
      <dc:creator>Anthony khan</dc:creator>
      <dc:date>2002-04-23T14:31:03Z</dc:date>
    </item>
    <item>
      <title>Re: Script help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2709286#M60105</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Try to use uuencode to send the mail, there are more information in man pages.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Justo.</description>
      <pubDate>Tue, 23 Apr 2002 14:35:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2709286#M60105</guid>
      <dc:creator>Justo Exposito</dc:creator>
      <dc:date>2002-04-23T14:35:05Z</dc:date>
    </item>
    <item>
      <title>Re: Script help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2709287#M60106</link>
      <description>Hi Anthony&lt;BR /&gt;&lt;BR /&gt;This is from the man page:&lt;BR /&gt;      To encode and send a compiled program foo to user friend:&lt;BR /&gt;&lt;BR /&gt;           uuencode foo foo | mailx -s 'new program' friend&lt;BR /&gt;&lt;BR /&gt;      After receiving the mail message, user friend can decode the program&lt;BR /&gt;      by first saving the message in a file foo.mail and executing the&lt;BR /&gt;      command:&lt;BR /&gt;&lt;BR /&gt;           uudecode foo.mail&lt;BR /&gt;&lt;BR /&gt;Hope this help,&lt;BR /&gt;&lt;BR /&gt;Justo.</description>
      <pubDate>Tue, 23 Apr 2002 14:37:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2709287#M60106</guid>
      <dc:creator>Justo Exposito</dc:creator>
      <dc:date>2002-04-23T14:37:31Z</dc:date>
    </item>
    <item>
      <title>Re: Script help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2709288#M60107</link>
      <description>Hi Anthony,&lt;BR /&gt;&lt;BR /&gt; Would add something like&lt;BR /&gt;&lt;BR /&gt;uuencode $FILE2FIND | mailx -s "subject_line" user@domain.com&lt;BR /&gt;&lt;BR /&gt;OR&lt;BR /&gt;&lt;BR /&gt;mailx -s "subject_line" user@domain.com &amp;lt; uuencode $FILE2FIND&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Jeff&lt;BR /&gt;</description>
      <pubDate>Tue, 23 Apr 2002 14:40:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2709288#M60107</guid>
      <dc:creator>Jeff Schussele</dc:creator>
      <dc:date>2002-04-23T14:40:30Z</dc:date>
    </item>
    <item>
      <title>Re: Script help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2709289#M60108</link>
      <description>This code should work as well.&lt;BR /&gt;&lt;BR /&gt;( &lt;BR /&gt;echo "From: &lt;PLACE_YOUR_NAME_HERE&gt;" &lt;BR /&gt;echo "To: &lt;PLACE_THERE_NAME_HERE&gt;" &lt;BR /&gt;echo "Subject: &lt;PLEASE subject="" here=""&gt;" &lt;BR /&gt;echo "This is the body of the e-mail. &lt;BR /&gt;If you are having any problem with this file please give us a call. &lt;BR /&gt;&lt;YOUR name="" goes="" here=""&gt; &lt;BR /&gt;&lt;YOUR title="" goes="" here=""&gt; &lt;BR /&gt;&lt;YOUR phone="" number="" goes="" here=""&gt;" &lt;BR /&gt;/usr/bin/uuencode /local/filename filename &lt;BR /&gt;) | /usr/sbin/sendmail user@company.com &lt;BR /&gt;&lt;BR /&gt;Hai&lt;BR /&gt;&lt;BR /&gt;&lt;/YOUR&gt;&lt;/YOUR&gt;&lt;/YOUR&gt;&lt;/PLEASE&gt;&lt;/PLACE_THERE_NAME_HERE&gt;&lt;/PLACE_YOUR_NAME_HERE&gt;</description>
      <pubDate>Tue, 23 Apr 2002 14:58:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2709289#M60108</guid>
      <dc:creator>Hai Nguyen_1</dc:creator>
      <dc:date>2002-04-23T14:58:10Z</dc:date>
    </item>
    <item>
      <title>Re: Script help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2709290#M60109</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;uuencode $filecheck | mailx -s "subject_line" user@domain.com&lt;BR /&gt;&lt;BR /&gt;I am getting this in email&lt;BR /&gt;&lt;BR /&gt;begin 0 tdmgw.ret.txt&lt;BR /&gt;.=&amp;amp;1M9W&lt;N&gt;&lt;/N&gt;`&lt;BR /&gt;end&lt;BR /&gt;&lt;BR /&gt;The email will go to window or NT system, Can someone put the light here&lt;BR /&gt;</description>
      <pubDate>Tue, 23 Apr 2002 15:11:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2709290#M60109</guid>
      <dc:creator>Anthony khan</dc:creator>
      <dc:date>2002-04-23T15:11:33Z</dc:date>
    </item>
    <item>
      <title>Re: Script help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2709291#M60110</link>
      <description>Hi Anthony,&lt;BR /&gt;&lt;BR /&gt;This is because you must put:&lt;BR /&gt;uuencode $filecheck $filecheck| mailx -s "subject_line" user@domain.com &lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Justo.</description>
      <pubDate>Tue, 23 Apr 2002 15:22:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2709291#M60110</guid>
      <dc:creator>Justo Exposito</dc:creator>
      <dc:date>2002-04-23T15:22:25Z</dc:date>
    </item>
    <item>
      <title>Re: Script help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2709292#M60111</link>
      <description>Anthony,&lt;BR /&gt;&lt;BR /&gt; Yep Justo is correct.&lt;BR /&gt;Sorry I left out the output filename in the uuencode command.&lt;BR /&gt;&lt;BR /&gt;Rgds,&lt;BR /&gt;Jeff</description>
      <pubDate>Tue, 23 Apr 2002 15:24:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2709292#M60111</guid>
      <dc:creator>Jeff Schussele</dc:creator>
      <dc:date>2002-04-23T15:24:50Z</dc:date>
    </item>
    <item>
      <title>Re: Script help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2709293#M60112</link>
      <description>Hi Again,&lt;BR /&gt;&lt;BR /&gt;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&lt;BR /&gt;see the man page.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Justo.</description>
      <pubDate>Tue, 23 Apr 2002 15:25:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2709293#M60112</guid>
      <dc:creator>Justo Exposito</dc:creator>
      <dc:date>2002-04-23T15:25:30Z</dc:date>
    </item>
    <item>
      <title>Re: Script help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2709294#M60113</link>
      <description>Hi Justo,&lt;BR /&gt;&lt;BR /&gt;After doing uuencode $filecheck $filecheck |mailx -s "files arrive" email, i am getting this now&lt;BR /&gt;&lt;BR /&gt;begin 644 tdmgw.ret.txt&lt;BR /&gt;M8V%T('-P:&amp;amp;EN&amp;gt;"YP87-S=V0@?'-O&lt;G0&gt;&lt;/G0&gt;M;W0@?&amp;amp;-U="`M9"(Z(B`M9C,L-2!\('-E="`G&lt;R&gt;&lt;/R&gt;&amp;lt;&amp;gt;W!R:6YT9B@B)35D)7-&amp;lt;;B(L)#$L)#(I?2&amp;lt;@"B\L&lt;BR /&gt;`&lt;BR /&gt;end&lt;BR /&gt;</description>
      <pubDate>Tue, 23 Apr 2002 15:27:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2709294#M60113</guid>
      <dc:creator>Anthony khan</dc:creator>
      <dc:date>2002-04-23T15:27:46Z</dc:date>
    </item>
    <item>
      <title>Re: Script help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2709295#M60114</link>
      <description>Check out Rita's method (the 2nd last reply) in this thread. It appends the "include" statement to the file before sending it out.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x859903bbece8d5118ff40090279cd0f9,00.html" target="_blank"&gt;http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x859903bbece8d5118ff40090279cd0f9,00.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 23 Apr 2002 15:31:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2709295#M60114</guid>
      <dc:creator>S.K. Chan</dc:creator>
      <dc:date>2002-04-23T15:31:22Z</dc:date>
    </item>
    <item>
      <title>Re: Script help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2709296#M60115</link>
      <description>Hi Anthony,&lt;BR /&gt;&lt;BR /&gt;Can you try to do with a simple ascii file? &lt;BR /&gt;I just tried with a simple ascii file called probe and it work fine between my HP/UX and my NT with outlook.&lt;BR /&gt;&lt;BR /&gt;uuencode probe probe |mailx -s 'hello' myuser@mydomain.es&lt;BR /&gt;&lt;BR /&gt;If you try it and all it's good then you can put the right sentence in your complex script.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Justo.</description>
      <pubDate>Tue, 23 Apr 2002 15:39:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2709296#M60115</guid>
      <dc:creator>Justo Exposito</dc:creator>
      <dc:date>2002-04-23T15:39:03Z</dc:date>
    </item>
    <item>
      <title>Re: Script help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2709297#M60116</link>
      <description>Hi Anthony,&lt;BR /&gt;&lt;BR /&gt;You need a -m flag for mailx to send it as an attachment ...&lt;BR /&gt;check the man pages for mailx&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;uuencode filename filename | mailx -m -s "subject" abc@abc.com&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Shabu</description>
      <pubDate>Tue, 23 Apr 2002 17:04:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2709297#M60116</guid>
      <dc:creator>SHABU KHAN</dc:creator>
      <dc:date>2002-04-23T17:04:46Z</dc:date>
    </item>
    <item>
      <title>Re: Script help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2709298#M60117</link>
      <description>Hi,&lt;BR /&gt;On my side, I'm using another tool called 'nail' which create mime attachment.&lt;BR /&gt;You can download it at &lt;BR /&gt;&lt;A href="http://hpux.cs.utah.edu/hppd/hpux/Networking/Mail/nail-9.30/" target="_blank"&gt;http://hpux.cs.utah.edu/hppd/hpux/Networking/Mail/nail-9.30/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;syntax is quite the same as mail and is very easy to use.&lt;BR /&gt;</description>
      <pubDate>Wed, 24 Apr 2002 09:55:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2709298#M60117</guid>
      <dc:creator>benoit Bruckert</dc:creator>
      <dc:date>2002-04-24T09:55:01Z</dc:date>
    </item>
    <item>
      <title>Re: Script help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2709299#M60118</link>
      <description>Hi Anthony,&lt;BR /&gt;&lt;BR /&gt;This works?&lt;BR /&gt;This is closed?&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Justo.</description>
      <pubDate>Wed, 24 Apr 2002 15:34:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2709299#M60118</guid>
      <dc:creator>Justo Exposito</dc:creator>
      <dc:date>2002-04-24T15:34:19Z</dc:date>
    </item>
    <item>
      <title>Re: Script help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2709300#M60119</link>
      <description>Hi Justo, Sorry I was busy on other stuff, I am able to attach 1 file with the following command but unable to attach multiple files, can someone help,&lt;BR /&gt;&lt;BR /&gt;ux2dos $filecheck &amp;gt; convertfile&lt;BR /&gt;uuencode convertfile convertfile|mailx -m -s "files arrive" emailadd.&lt;BR /&gt;&lt;BR /&gt;Can someone help how to attach  multiples files</description>
      <pubDate>Thu, 25 Apr 2002 12:16:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2709300#M60119</guid>
      <dc:creator>Anthony khan</dc:creator>
      <dc:date>2002-04-25T12:16:35Z</dc:date>
    </item>
    <item>
      <title>Re: Script help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2709301#M60120</link>
      <description>My script now is...&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh &lt;BR /&gt;                                    DIR2SRCH="/playpen/td" &lt;BR /&gt;                                    FILE2FIND="td*.txt" &lt;BR /&gt;                                    EXCLUDEDIRS='-e \/old\/ -e \/data\/' &lt;BR /&gt;                                    file=" " &lt;BR /&gt;                                    filecheck=" " &lt;BR /&gt;                                    filecheck=`find ${DIR2SRCH} -type f -name "${FILE2FIND}" -size +0c -exec ls -l {} \; |grep -v&lt;BR /&gt;                                    ${EXCLUDEDIRS} |cut -c71-90` &lt;BR /&gt;                                    if [ -z "$filecheck" ] &lt;BR /&gt;                                    then &lt;BR /&gt;                                    exit &lt;BR /&gt;       us2doc $filecheck &amp;gt; convertfile                             else &lt;BR /&gt;                                    find ${DIR2SRCH} -type f -name "${FILE2FIND}" -size +0c -exec ls -l {} \; |grep -v&lt;BR /&gt;                                    ${EXCLUDEDIRS} |cut -c71-90|uuencode convertfile convertfile|mailx -m -s "Files arrive" email address &lt;BR /&gt;                                    for file in `find ${DIR2SRCH} -type f -name "${FILE2FIND}" -size +0c -exec ls -l {} \; |grep -v&lt;BR /&gt;                                    ${EXCLUDEDIRS} |cut -c71-90` &lt;BR /&gt;                                    do &lt;BR /&gt;                                    mv /playpen/td/$file /playpen/td/data/$file &lt;BR /&gt;                                    done &lt;BR /&gt;                                    fi</description>
      <pubDate>Thu, 25 Apr 2002 12:22:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2709301#M60120</guid>
      <dc:creator>Anthony khan</dc:creator>
      <dc:date>2002-04-25T12:22:16Z</dc:date>
    </item>
    <item>
      <title>Re: Script help</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2709302#M60121</link>
      <description>Hi Anthony,&lt;BR /&gt;&lt;BR /&gt;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:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://hpux.connect.org.uk/hppd/hpux/" target="_blank"&gt;http://hpux.connect.org.uk/hppd/hpux/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Best Regards,&lt;BR /&gt;&lt;BR /&gt;Justo.</description>
      <pubDate>Thu, 25 Apr 2002 13:16:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2709302#M60121</guid>
      <dc:creator>Justo Exposito</dc:creator>
      <dc:date>2002-04-25T13:16:26Z</dc:date>
    </item>
  </channel>
</rss>

