<?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 Scripting Help in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/scripting-help/m-p/3866335#M98575</link>
    <description>Hello,&lt;BR /&gt;&lt;BR /&gt;I am new to this scripting world. I was wondering if anyone had a script that would find a certian file in my HPUX 11.0.b server then either email it or FTP it out to a certian address. It really help me out. Thank you in advance.</description>
    <pubDate>Wed, 20 Sep 2006 07:46:11 GMT</pubDate>
    <dc:creator>Sean Kuruvilla</dc:creator>
    <dc:date>2006-09-20T07:46:11Z</dc:date>
    <item>
      <title>Scripting Help</title>
      <link>https://community.hpe.com/t5/operating-system-linux/scripting-help/m-p/3866335#M98575</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;I am new to this scripting world. I was wondering if anyone had a script that would find a certian file in my HPUX 11.0.b server then either email it or FTP it out to a certian address. It really help me out. Thank you in advance.</description>
      <pubDate>Wed, 20 Sep 2006 07:46:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/scripting-help/m-p/3866335#M98575</guid>
      <dc:creator>Sean Kuruvilla</dc:creator>
      <dc:date>2006-09-20T07:46:11Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting Help</title>
      <link>https://community.hpe.com/t5/operating-system-linux/scripting-help/m-p/3866336#M98576</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;There are plenty of threads in this Forum for simple FTP scripts.  Simply search for those.  One variation is:&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh &lt;BR /&gt;ftp -n &amp;lt;&amp;lt; EOF &lt;BR /&gt;open thehost &lt;BR /&gt;user uuu ppp &lt;BR /&gt;get /tmp/stuff &lt;BR /&gt;close &lt;BR /&gt;EOF &lt;BR /&gt;&lt;BR /&gt;...Substitute the appropriate hostname for "thehost".  Substitute the appropriate user login and password for the "uuu" and "ppp" strings, respectively, and do a 'get' or 'put' of the file you want, accordingly.&lt;BR /&gt;&lt;BR /&gt;As for finding a file, 'find' is your friend.  For example, to find a file containing the characters 'sean' in the directory '/var' you could do:&lt;BR /&gt;&lt;BR /&gt;# find /var -xdev -type f -name "*sean*"&lt;BR /&gt;&lt;BR /&gt;The '-xdev' argument prevents 'find' from crossing mountpoints in its search through the 'var' directory and subdirectories.  The '-type f' says look only for *files*, not directories and sockets and pipes.  The enclosure of the string "*sean*" in quotes keeps the shell from expanding the wildcard characters and let's 'find' look for any file basename that contains the string "sean" somewhere.  Thus, the 'find' would find "sean",  "seansfile", "the_sean_file", etc.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Wed, 20 Sep 2006 07:56:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/scripting-help/m-p/3866336#M98576</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2006-09-20T07:56:27Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting Help</title>
      <link>https://community.hpe.com/t5/operating-system-linux/scripting-help/m-p/3866337#M98577</link>
      <description>Sean,&lt;BR /&gt;if you know there is only one file by that name:&lt;BR /&gt;cat `find / -name filename` | mailx -s"Found" email@aol.com&lt;BR /&gt;&lt;BR /&gt;where you replace filename with the filename you are looking for and email@aol.com with your email address.</description>
      <pubDate>Wed, 20 Sep 2006 08:06:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/scripting-help/m-p/3866337#M98577</guid>
      <dc:creator>Peter Godron</dc:creator>
      <dc:date>2006-09-20T08:06:50Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting Help</title>
      <link>https://community.hpe.com/t5/operating-system-linux/scripting-help/m-p/3866338#M98578</link>
      <description>and another example of how you could email as attachement if file is unique... mime type could be changed depending on the type of file. Make the body and subject whatever...&lt;BR /&gt;&lt;BR /&gt;find /path -type f -name yourfile -print |xargs mailfile.sh&lt;BR /&gt;&lt;BR /&gt;Hope this helps,&lt;BR /&gt;-denver&lt;BR /&gt;</description>
      <pubDate>Wed, 20 Sep 2006 08:21:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/scripting-help/m-p/3866338#M98578</guid>
      <dc:creator>HP User-St. Louis-MO</dc:creator>
      <dc:date>2006-09-20T08:21:29Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting Help</title>
      <link>https://community.hpe.com/t5/operating-system-linux/scripting-help/m-p/3866339#M98579</link>
      <description>Hi Sean,&lt;BR /&gt;&lt;BR /&gt;Multiple files matching your search pattern are okay, too:&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;find /abs_path -type f -name '*query*' -print | xargs tar cvf /tmp/query.${$}.tar&lt;BR /&gt;uuencode /tmp/query.${$}.tar query.tar | mailx -m -s "[$(date +%m\/%d\/%y)] query.tar attached" your@email.addr&lt;BR /&gt;rm -f /tmp/query.${$}.tar&lt;BR /&gt;exit&lt;BR /&gt;&lt;BR /&gt;PCS&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 20 Sep 2006 08:43:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/scripting-help/m-p/3866339#M98579</guid>
      <dc:creator>spex</dc:creator>
      <dc:date>2006-09-20T08:43:37Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting Help</title>
      <link>https://community.hpe.com/t5/operating-system-linux/scripting-help/m-p/3866340#M98580</link>
      <description>Dont forget , what is mentioned as last entry in this itrc entry, (about scripting in cron )&lt;BR /&gt;If thats where you are going to use it ... &lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1061204&amp;amp;admit=-682735245+1158777821599+28353475" target="_blank"&gt;http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1061204&amp;amp;admit=-682735245+1158777821599+28353475&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;regards martin at unixera dk</description>
      <pubDate>Thu, 21 Sep 2006 14:41:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/scripting-help/m-p/3866340#M98580</guid>
      <dc:creator>Martin Roende</dc:creator>
      <dc:date>2006-09-21T14:41:13Z</dc:date>
    </item>
  </channel>
</rss>

