<?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 Re: Automate FTP in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/automate-ftp/m-p/4939617#M102671</link>
    <description>Sally -&lt;BR /&gt;There are probably more eloquent ways to do this, but ...&lt;BR /&gt;&lt;BR /&gt;From and ftp session:&lt;BR /&gt;1. Set the prompt off by issuing the ftp prompt command.&lt;BR /&gt;2. ls yourfile* dummy&lt;BR /&gt;The above will list yourfile with date/timestamp in the file dummy on your local machine.&lt;BR /&gt;3. Quit the ftp.&lt;BR /&gt;4. Compare your old file to that in the dummy file created in #2.&lt;BR /&gt;5. Based on the comparison, go on with your business. i.e. set off the email and second ftp job to pick up the file.&lt;BR /&gt;&lt;BR /&gt;Best of luck.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;dl</description>
    <pubDate>Wed, 09 Nov 2005 16:32:05 GMT</pubDate>
    <dc:creator>Dave La Mar</dc:creator>
    <dc:date>2005-11-09T16:32:05Z</dc:date>
    <item>
      <title>Automate FTP</title>
      <link>https://community.hpe.com/t5/operating-system-linux/automate-ftp/m-p/4939613#M102667</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I need help with figuring out how to script the following.  There is an FTP server that contains a file that I need to download.  A new one is put there almost every day...I don't know when, it is random.  If there is not a new file put there, then the old one remains until the new arrives (different name each time).  I know how to automatically ftp, but want I want to do is:&lt;BR /&gt;&lt;BR /&gt;1.  only download the file if it is new (in other words, I don't have it downloaded already)&lt;BR /&gt;&lt;BR /&gt;2. email myself as a notification that a new file has been obtained.&lt;BR /&gt;&lt;BR /&gt;Thanks!</description>
      <pubDate>Wed, 09 Nov 2005 15:56:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/automate-ftp/m-p/4939613#M102667</guid>
      <dc:creator>Coolmar</dc:creator>
      <dc:date>2005-11-09T15:56:29Z</dc:date>
    </item>
    <item>
      <title>Re: Automate FTP</title>
      <link>https://community.hpe.com/t5/operating-system-linux/automate-ftp/m-p/4939614#M102668</link>
      <description>An option to automate ftp file transfers without using the $HOME/.netrc file...&lt;BR /&gt;&lt;BR /&gt;ftp -n -v hostname &amp;gt; $LOG &amp;lt;&amp;lt; ENDFTP&lt;BR /&gt;user username passwd&lt;BR /&gt;prompt off&lt;BR /&gt;binary&lt;BR /&gt;cd wherever&lt;BR /&gt;lcd wherever&lt;BR /&gt;mget *&lt;BR /&gt;quit&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;If you are wanting to do some comparisons for newer file, will need a script that contains logic to compare the date/time stamp of the file to be downloaded. &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 09 Nov 2005 16:10:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/automate-ftp/m-p/4939614#M102668</guid>
      <dc:creator>Rick Garland</dc:creator>
      <dc:date>2005-11-09T16:10:09Z</dc:date>
    </item>
    <item>
      <title>Re: Automate FTP</title>
      <link>https://community.hpe.com/t5/operating-system-linux/automate-ftp/m-p/4939615#M102669</link>
      <description>Thanks Rick for the response.  I already have the script and it works fine...it is the "logic" that I am looking for.&lt;BR /&gt;&lt;BR /&gt;S.</description>
      <pubDate>Wed, 09 Nov 2005 16:16:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/automate-ftp/m-p/4939615#M102669</guid>
      <dc:creator>Coolmar</dc:creator>
      <dc:date>2005-11-09T16:16:41Z</dc:date>
    </item>
    <item>
      <title>Re: Automate FTP</title>
      <link>https://community.hpe.com/t5/operating-system-linux/automate-ftp/m-p/4939616#M102670</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;The ftp client is not very good at knowing whether the file is newer or not.&lt;BR /&gt;&lt;BR /&gt;You could however insert some code into the excellent response you have already received.&lt;BR /&gt;&lt;BR /&gt;ls -la | awk '{print $5 $6 $7 $8} &amp;gt; /tmp/localfile&lt;BR /&gt;&lt;BR /&gt;# now you can compare the time and date stamp and size to what you already have on your local system.&lt;BR /&gt;&lt;BR /&gt;I'm not sure it will be 100% accurate.&lt;BR /&gt;&lt;BR /&gt;A better methodology perhaps would be for the ftp server to run a command like this&lt;BR /&gt;&lt;BR /&gt;find /ftpdir -mtime -exec 'ls -1 &amp;gt; /ftp/downloadlist'&lt;BR /&gt;&lt;BR /&gt;or maybe &lt;BR /&gt;&lt;BR /&gt;find /ftpdir -ctime -exec 'ls -1 &amp;gt; /ftp/downloadlist'&lt;BR /&gt;&lt;BR /&gt;Then you download that list every day, feed it into your ftp scripot and get the new files.&lt;BR /&gt;&lt;BR /&gt;A little help at ftp side is needed.&lt;BR /&gt;&lt;BR /&gt;Or you can download and compare later, but it sounds like you are trying to conserver bandwitch.&lt;BR /&gt;&lt;BR /&gt;Hope I've given you an idea on how to approach the problem.&lt;BR /&gt;&lt;BR /&gt;As for the email part:&lt;BR /&gt;&lt;BR /&gt;    echo -e "To:      $EMAIL_TO" &amp;gt; $fmesg&lt;BR /&gt;    echo -e "From:    $EMAIL_FROM" &amp;gt;&amp;gt; $fmesg&lt;BR /&gt;    echo -e "Cc:    prottertemp@investmenttool.com" &amp;gt;&amp;gt; $fmesg&lt;BR /&gt;    echo -e "Subject: $EMAIL_SUBJECT" &amp;gt;&amp;gt; $fmesg&lt;BR /&gt;    echo -e "" &amp;gt;&amp;gt; $fmesg&lt;BR /&gt;    /bin/cat $fbody &amp;gt;&amp;gt; $fmesg&lt;BR /&gt; cat $fmesg | /usr/sbin/sendmail -t&lt;BR /&gt;&lt;BR /&gt;&amp;gt; $fbody&lt;BR /&gt;rm -f $fbody&lt;BR /&gt;&amp;gt; $fmesg&lt;BR /&gt;rm -f $fmesg&lt;BR /&gt;&amp;gt; $ftext&lt;BR /&gt;rm -f $ftext&lt;BR /&gt;&lt;BR /&gt;just set the variables and decide what the text is. fmesg is a temporary holding file for the message. Should be pretty obvious.&lt;BR /&gt;&lt;BR /&gt;This is production code from a Linux box, but it is also running on HP boxes I used to admin in the US. Linux boxes are mine, I'm allowed to peak.&lt;BR /&gt;&lt;BR /&gt;Good Luck,&lt;BR /&gt;&lt;BR /&gt;SEP&lt;BR /&gt;</description>
      <pubDate>Wed, 09 Nov 2005 16:27:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/automate-ftp/m-p/4939616#M102670</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2005-11-09T16:27:06Z</dc:date>
    </item>
    <item>
      <title>Re: Automate FTP</title>
      <link>https://community.hpe.com/t5/operating-system-linux/automate-ftp/m-p/4939617#M102671</link>
      <description>Sally -&lt;BR /&gt;There are probably more eloquent ways to do this, but ...&lt;BR /&gt;&lt;BR /&gt;From and ftp session:&lt;BR /&gt;1. Set the prompt off by issuing the ftp prompt command.&lt;BR /&gt;2. ls yourfile* dummy&lt;BR /&gt;The above will list yourfile with date/timestamp in the file dummy on your local machine.&lt;BR /&gt;3. Quit the ftp.&lt;BR /&gt;4. Compare your old file to that in the dummy file created in #2.&lt;BR /&gt;5. Based on the comparison, go on with your business. i.e. set off the email and second ftp job to pick up the file.&lt;BR /&gt;&lt;BR /&gt;Best of luck.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;dl</description>
      <pubDate>Wed, 09 Nov 2005 16:32:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/automate-ftp/m-p/4939617#M102671</guid>
      <dc:creator>Dave La Mar</dc:creator>
      <dc:date>2005-11-09T16:32:05Z</dc:date>
    </item>
    <item>
      <title>Re: Automate FTP</title>
      <link>https://community.hpe.com/t5/operating-system-linux/automate-ftp/m-p/4939618#M102672</link>
      <description>Hi Sally:&lt;BR /&gt;&lt;BR /&gt;See the man pages for 'ftp(1)'.  You have a 'newer' variation of 'get':&lt;BR /&gt;&lt;BR /&gt;# newer filename&lt;BR /&gt;&lt;BR /&gt;...gets the file only if the modification time of the remote file is more recent that the file on the current system.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Wed, 09 Nov 2005 16:34:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/automate-ftp/m-p/4939618#M102672</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2005-11-09T16:34:14Z</dc:date>
    </item>
    <item>
      <title>Re: Automate FTP</title>
      <link>https://community.hpe.com/t5/operating-system-linux/automate-ftp/m-p/4939619#M102673</link>
      <description>Can use the 'ftp newer &lt;FILE-NAME&gt;'&lt;BR /&gt;&lt;BR /&gt;Get the file only if the modification time of the remote file is&lt;BR /&gt;           more recent that the file on the current system.  If the file&lt;BR /&gt;           does not exist on the current system, the remote file is&lt;BR /&gt;           considered newer.  Otherwise, this command is identical to get.&lt;BR /&gt;&lt;BR /&gt;As to sending mail, can have a job that periodically checks the date/time of the file. If newer, then send mail.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;DATE=`ll &lt;FILE-NAME&gt; | awk '{if (($7 == "9")) print $9}'`&lt;BR /&gt;if [ $DATE != date +%e` ]&lt;BR /&gt;then&lt;BR /&gt;mailx ....&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;Hope that helps.&lt;BR /&gt;&lt;/FILE-NAME&gt;&lt;/FILE-NAME&gt;</description>
      <pubDate>Wed, 09 Nov 2005 16:36:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/automate-ftp/m-p/4939619#M102673</guid>
      <dc:creator>Rick Garland</dc:creator>
      <dc:date>2005-11-09T16:36:20Z</dc:date>
    </item>
    <item>
      <title>Re: Automate FTP</title>
      <link>https://community.hpe.com/t5/operating-system-linux/automate-ftp/m-p/4939620#M102674</link>
      <description>BTW, I use the $7 == "9" as an example. Today's date being 9</description>
      <pubDate>Wed, 09 Nov 2005 16:37:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/automate-ftp/m-p/4939620#M102674</guid>
      <dc:creator>Rick Garland</dc:creator>
      <dc:date>2005-11-09T16:37:39Z</dc:date>
    </item>
    <item>
      <title>Re: Automate FTP</title>
      <link>https://community.hpe.com/t5/operating-system-linux/automate-ftp/m-p/4939621#M102675</link>
      <description>Actually the FTP is extremely good at knowing whether a file is newer or not iff you use the Net::FTP Perl client but that should not be necessary if I can depend upon you being truthful about the filename changing everytime. All we have to do is list the remote directory and compare those names to the one found in the destination directory on the local machine. Any files not found should be retrieved and mail should be sent. I already have a Perl script which will do all of the hard work, we just need to add some shell logic.&lt;BR /&gt;&lt;BR /&gt;ftp.sh &lt;BR /&gt;--------------------------------&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;&lt;BR /&gt;PATH=${PATH}:/usr/local/bin&lt;BR /&gt;export PATH&lt;BR /&gt;&lt;BR /&gt;typeset PROG=${0##*/}&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;typeset TDIR=${TMPDIR:-/var/tmp}&lt;BR /&gt;typeset PID=${?}&lt;BR /&gt;typeset T1=${TDIR}/X${PID}_1.txt&lt;BR /&gt;&lt;BR /&gt;trap 'eval rm -f ${T1}' 0 1 2 15&lt;BR /&gt;&lt;BR /&gt;typeset SRCDIR="/home/cstephen"&lt;BR /&gt;typeset REMHOST="bugs"&lt;BR /&gt;typeset DESTDIR="/tmp/cstephen"&lt;BR /&gt;typeset U="cstephen"&lt;BR /&gt;typeset P="-p secret"&lt;BR /&gt;typeset ADDRESS="mmouse@disney.com"&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;typeset -i STAT=0&lt;BR /&gt;&lt;BR /&gt;# make sure destination directory exists"&lt;BR /&gt;&lt;BR /&gt;if [[ ! -d "${DESTDIR}" ]]&lt;BR /&gt;  then&lt;BR /&gt;    echo "Destination ${DESTDIR} does not exist." &amp;gt;&amp;amp;2&lt;BR /&gt;    exit 1&lt;BR /&gt;  fi&lt;BR /&gt;&lt;BR /&gt;cd "${DESTDIR}"&lt;BR /&gt;STAT=${?}&lt;BR /&gt;if [[ ${STAT} -ne 0 ]]&lt;BR /&gt;  then&lt;BR /&gt;    echo "Cannot cd to ${DESTDIR}; status ${STAT}." &amp;gt;&amp;amp;2&lt;BR /&gt;    exit 2&lt;BR /&gt;  fi&lt;BR /&gt;&lt;BR /&gt;#Get a list of files in directory ${DIR} on remotehost {REMHOST}&lt;BR /&gt;#Login as user ${U} using password ${P}. &lt;BR /&gt;#If a .netrc file is located on the client then no passwd is needed.&lt;BR /&gt;&lt;BR /&gt;ftpget.pl -h ${REMHOST} -l ${U} ${P} -L '' -d "${SRCDIR}" &amp;gt; ${T1}&lt;BR /&gt;STAT=${?}&lt;BR /&gt;if [[ ${STAT} -eq 0 ]] # dirlist okay&lt;BR /&gt;  then&lt;BR /&gt;    if [[ -s ${T1} ]]&lt;BR /&gt;      then&lt;BR /&gt;        typeset FNAME=""&lt;BR /&gt;        cat ${T1} | while read FNAME&lt;BR /&gt;          do&lt;BR /&gt;            if [[ ! -f ${FNAME} ]]&lt;BR /&gt;              then&lt;BR /&gt;                ftpget.pl -h ${REMHOST} -l ${U} ${P} -d "${SRCDIR}" "${FNAME}"&lt;BR /&gt;                STAT=${?}&lt;BR /&gt;                if [[ ${STAT} -eq 0 ]]&lt;BR /&gt;                  then&lt;BR /&gt;                    echo "New File: ${FNAME}" | mailx -s "New File" ${ADDRESS}&lt;BR /&gt;                  else&lt;BR /&gt;                    echo "Failed to get ${FNAME}; status ${STAT}" &amp;gt;&amp;amp;2&lt;BR /&gt;                    exit ${STAT}&lt;BR /&gt;                  fi&lt;BR /&gt;              fi  &lt;BR /&gt;          done&lt;BR /&gt;      fi&lt;BR /&gt;  else&lt;BR /&gt;    echo "${PROG} dirlist failed; status ${STAT}" &amp;gt;&amp;amp;2&lt;BR /&gt;  fi&lt;BR /&gt;exit ${STAT}&lt;BR /&gt;&lt;BR /&gt;-------------------------------&lt;BR /&gt;That should do it if I haven't made any typo's. You can add a patterm to the ftpget.pl -L argument to match only certain patterns. e.g -L 'Data*.txt'. Using Perl is a much better choice because you get error checking for free -- something that is very tedious in the shell. Note that you can also setup a .netrc file on your end and you don't need to pass the password. Man .netrc for details. If you want to do this more secure there is also a Net::SFTP module. You can then make a cron wrapper script for this and you are done.&lt;BR /&gt;&lt;BR /&gt;Here's the perl piece, ftpget.pl; the above script assumes that you install it in /usr/local/bin. I suggest that you invoke it as ftpget.pl -u for full usage because you may want to set binary or ASCII mode for the gets.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 09 Nov 2005 17:06:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/automate-ftp/m-p/4939621#M102675</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2005-11-09T17:06:07Z</dc:date>
    </item>
    <item>
      <title>Re: Automate FTP</title>
      <link>https://community.hpe.com/t5/operating-system-linux/automate-ftp/m-p/4939622#M102676</link>
      <description>Sally -&lt;BR /&gt;James nailed it with newer. &lt;BR /&gt;James -&lt;BR /&gt;This is a great tip! Wasn't aware of it, but will definitely use it.&lt;BR /&gt;&lt;BR /&gt;Thanks.&lt;BR /&gt;&lt;BR /&gt;And Sally, please no points on this reply, just wanted to acknowledge anothers great contribution.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;dl</description>
      <pubDate>Wed, 09 Nov 2005 17:28:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/automate-ftp/m-p/4939622#M102676</guid>
      <dc:creator>Dave La Mar</dc:creator>
      <dc:date>2005-11-09T17:28:50Z</dc:date>
    </item>
    <item>
      <title>Re: Automate FTP</title>
      <link>https://community.hpe.com/t5/operating-system-linux/automate-ftp/m-p/4939623#M102677</link>
      <description>Thanks for all the responses....I think James hit it with "newer".  I am going to try that.&lt;BR /&gt;&lt;BR /&gt;S.</description>
      <pubDate>Thu, 10 Nov 2005 09:10:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/automate-ftp/m-p/4939623#M102677</guid>
      <dc:creator>Coolmar</dc:creator>
      <dc:date>2005-11-10T09:10:30Z</dc:date>
    </item>
    <item>
      <title>Re: Automate FTP</title>
      <link>https://community.hpe.com/t5/operating-system-linux/automate-ftp/m-p/4939624#M102678</link>
      <description>hmmmmmm....I sent my previous reponse too soon.  I am wondering, would the files have to have the same name with "newer"?  The problem is that the name always changes...the one consistent thing is that it is always a tar file.  However, I can't say "newer *.tar".  What I want to accomplish is to check the ftp server throughout the day for the new tar file.  If the tar file that exists is what I already have in my directory, then done.  If it is a new file, that I don't have...download it.&lt;BR /&gt;&lt;BR /&gt;Thanks,</description>
      <pubDate>Thu, 10 Nov 2005 09:23:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/automate-ftp/m-p/4939624#M102678</guid>
      <dc:creator>Coolmar</dc:creator>
      <dc:date>2005-11-10T09:23:44Z</dc:date>
    </item>
    <item>
      <title>Re: Automate FTP</title>
      <link>https://community.hpe.com/t5/operating-system-linux/automate-ftp/m-p/4939625#M102679</link>
      <description>Use mget (instead of get) and specify 'newer *.tar'&lt;BR /&gt;&lt;BR /&gt;The mget accepts wildcards.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 10 Nov 2005 09:29:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/automate-ftp/m-p/4939625#M102679</guid>
      <dc:creator>Rick Garland</dc:creator>
      <dc:date>2005-11-10T09:29:26Z</dc:date>
    </item>
    <item>
      <title>Re: Automate FTP</title>
      <link>https://community.hpe.com/t5/operating-system-linux/automate-ftp/m-p/4939626#M102680</link>
      <description>I tried that, and this was what came back:&lt;BR /&gt;&lt;BR /&gt;ftp&amp;gt; mget newer *.tar&lt;BR /&gt;newer: The system cannot find the file specified.&lt;BR /&gt;mget dat-4624.tar? y&lt;BR /&gt;200 PORT command successful.&lt;BR /&gt;150 Opening ASCII mode data connection for dat-4624.tar(7710720 bytes).&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Then it starts "getting" the file.  I must not be using the correct syntax or something.  Shouldn't it determine that there is only one tar file there, so that would be the one....and it is not newer than what I have and therefore not download it?&lt;BR /&gt;</description>
      <pubDate>Thu, 10 Nov 2005 09:36:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/automate-ftp/m-p/4939626#M102680</guid>
      <dc:creator>Coolmar</dc:creator>
      <dc:date>2005-11-10T09:36:33Z</dc:date>
    </item>
    <item>
      <title>Re: Automate FTP</title>
      <link>https://community.hpe.com/t5/operating-system-linux/automate-ftp/m-p/4939627#M102681</link>
      <description>What happens when you turn off the prompt?&lt;BR /&gt;&lt;BR /&gt;prompt off&lt;BR /&gt;mget newer *.tar&lt;BR /&gt;...&lt;BR /&gt;</description>
      <pubDate>Thu, 10 Nov 2005 09:46:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/automate-ftp/m-p/4939627#M102681</guid>
      <dc:creator>Rick Garland</dc:creator>
      <dc:date>2005-11-10T09:46:38Z</dc:date>
    </item>
    <item>
      <title>Re: Automate FTP</title>
      <link>https://community.hpe.com/t5/operating-system-linux/automate-ftp/m-p/4939628#M102682</link>
      <description>It starts getting the file.  However, I already have that one, so I don't want it to get it.&lt;BR /&gt;&lt;BR /&gt; prompt off&lt;BR /&gt;Interactive mode off.&lt;BR /&gt;ftp&amp;gt; mget newer *.tar&lt;BR /&gt;newer: The system cannot find the file specified.&lt;BR /&gt;local: dat-4624.tar remote: dat-4624.tar&lt;BR /&gt;200 PORT command successful.&lt;BR /&gt;150 Opening ASCII mode data connection for dat-4624.tar(7710720 bytes).&lt;BR /&gt;</description>
      <pubDate>Thu, 10 Nov 2005 09:53:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/automate-ftp/m-p/4939628#M102682</guid>
      <dc:creator>Coolmar</dc:creator>
      <dc:date>2005-11-10T09:53:57Z</dc:date>
    </item>
    <item>
      <title>Re: Automate FTP</title>
      <link>https://community.hpe.com/t5/operating-system-linux/automate-ftp/m-p/4939629#M102683</link>
      <description>Is there an equivalent to using grep within an ftp session?  Like, if I could list the files and grep on the tar files, that would leave that one...then awk everything but the name of the file to a variable...and mget newer $var ?  or is that asking too much of poor ftp?</description>
      <pubDate>Thu, 10 Nov 2005 10:01:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/automate-ftp/m-p/4939629#M102683</guid>
      <dc:creator>Coolmar</dc:creator>
      <dc:date>2005-11-10T10:01:18Z</dc:date>
    </item>
    <item>
      <title>Re: Automate FTP</title>
      <link>https://community.hpe.com/t5/operating-system-linux/automate-ftp/m-p/4939630#M102684</link>
      <description>The most important glaring problem with these other approaches is that there is zero error checking. If you use the method I suggested and check the exit status of the Perl script itself then if it's zero then all is well -- meaning the complete file got there intact. The good news (maybe) is that you really don't have to know any Perl at all. All of the logic is still in the shell script that calls the Perl script. You simply have to feed it arguments and check the exit status.</description>
      <pubDate>Thu, 10 Nov 2005 10:01:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/automate-ftp/m-p/4939630#M102684</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2005-11-10T10:01:24Z</dc:date>
    </item>
    <item>
      <title>Re: Automate FTP</title>
      <link>https://community.hpe.com/t5/operating-system-linux/automate-ftp/m-p/4939631#M102685</link>
      <description>If you use the -g option (noglobbing) instead of the newer, will that still download the file?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 10 Nov 2005 10:03:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/automate-ftp/m-p/4939631#M102685</guid>
      <dc:creator>Rick Garland</dc:creator>
      <dc:date>2005-11-10T10:03:50Z</dc:date>
    </item>
    <item>
      <title>Re: Automate FTP</title>
      <link>https://community.hpe.com/t5/operating-system-linux/automate-ftp/m-p/4939632#M102686</link>
      <description>You mean start the seesion with -g then mget *tar?&lt;BR /&gt;&lt;BR /&gt;ftp -g&lt;BR /&gt;mget *.tar&lt;BR /&gt;&lt;BR /&gt;BTW, what does "globbing mean"&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 10 Nov 2005 10:06:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/automate-ftp/m-p/4939632#M102686</guid>
      <dc:creator>Coolmar</dc:creator>
      <dc:date>2005-11-10T10:06:57Z</dc:date>
    </item>
  </channel>
</rss>

