<?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: cron and date command options for output in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-and-date-command-options-for-output/m-p/3202260#M166840</link>
    <description>The /usr/bin/date + \%Y\%m\%d worked.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;Jay</description>
    <pubDate>Wed, 25 Feb 2004 17:54:51 GMT</pubDate>
    <dc:creator>Jay W. Smith</dc:creator>
    <dc:date>2004-02-25T17:54:51Z</dc:date>
    <item>
      <title>cron and date command options for output</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-and-date-command-options-for-output/m-p/3202256#M166836</link>
      <description>I'm doing a make_tape_recovery backup from cron and I want the output to go to a file with the date at the end.&lt;BR /&gt;&lt;BR /&gt;I'd like the date format to be Year Month Day as numbers like the following:&lt;BR /&gt;"20040229"&lt;BR /&gt;&lt;BR /&gt;I can't seem to get it to work and I think it may be a bug in cron.&lt;BR /&gt;&lt;BR /&gt;Here's my command in cron:&lt;BR /&gt;10 15 24 2 * /opt/ignite/bin/make_tape_recovery -AIv &amp;gt; /home/js4519su/mtr_out.$(/usr/bin/date +%Y%m%d)&lt;BR /&gt;&lt;BR /&gt;This work when I perform the command outside of cron. It also works for "at" however, in cron, the file gets named as follows:&lt;BR /&gt;&lt;BR /&gt;"/home/js4519su/mtr_out."&lt;BR /&gt;&lt;BR /&gt;When I do it outside of cron or in "at" the file name is created as expected:&lt;BR /&gt;&lt;BR /&gt;"/home/js4519su/mtr_out.2004"&lt;BR /&gt;&lt;BR /&gt;Any ideas????&lt;BR /&gt;</description>
      <pubDate>Wed, 25 Feb 2004 14:01:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-and-date-command-options-for-output/m-p/3202256#M166836</guid>
      <dc:creator>Jay W. Smith</dc:creator>
      <dc:date>2004-02-25T14:01:55Z</dc:date>
    </item>
    <item>
      <title>Re: cron and date command options for output</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-and-date-command-options-for-output/m-p/3202257#M166837</link>
      <description>Try setting the date to a variable and then use the variable in the file name.&lt;BR /&gt;I would do a little script for the whole thing:&lt;BR /&gt;&lt;BR /&gt;DATE=$(/usr/din/date +%Y%m%d)&lt;BR /&gt;FILE=/home/js4519su/mtr_out.${DATE}&lt;BR /&gt;/opt/ignite/bin/make_tape_recovery -AIv &amp;gt; ${FILE}&lt;BR /&gt;&lt;BR /&gt;Then put the name of your script as the cron entry.</description>
      <pubDate>Wed, 25 Feb 2004 14:05:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-and-date-command-options-for-output/m-p/3202257#M166837</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2004-02-25T14:05:55Z</dc:date>
    </item>
    <item>
      <title>Re: cron and date command options for output</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-and-date-command-options-for-output/m-p/3202258#M166838</link>
      <description>cron makes special use of the percent sign.  Try $(/usr/bin/date +\%Y\%m\%d), should work fine.</description>
      <pubDate>Wed, 25 Feb 2004 14:51:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-and-date-command-options-for-output/m-p/3202258#M166838</guid>
      <dc:creator>Charlie Rubeor</dc:creator>
      <dc:date>2004-02-25T14:51:34Z</dc:date>
    </item>
    <item>
      <title>Re: cron and date command options for output</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-and-date-command-options-for-output/m-p/3202259#M166839</link>
      <description>Or use /usr/bin/date "+%Y%m%d") (with ").&lt;BR /&gt;&lt;BR /&gt;JP&lt;BR /&gt;</description>
      <pubDate>Wed, 25 Feb 2004 14:56:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-and-date-command-options-for-output/m-p/3202259#M166839</guid>
      <dc:creator>Jeroen Peereboom</dc:creator>
      <dc:date>2004-02-25T14:56:34Z</dc:date>
    </item>
    <item>
      <title>Re: cron and date command options for output</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-and-date-command-options-for-output/m-p/3202260#M166840</link>
      <description>The /usr/bin/date + \%Y\%m\%d worked.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;Jay</description>
      <pubDate>Wed, 25 Feb 2004 17:54:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-and-date-command-options-for-output/m-p/3202260#M166840</guid>
      <dc:creator>Jay W. Smith</dc:creator>
      <dc:date>2004-02-25T17:54:51Z</dc:date>
    </item>
    <item>
      <title>Re: cron and date command options for output</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/cron-and-date-command-options-for-output/m-p/3202261#M166841</link>
      <description>Please assign points.  I need them.</description>
      <pubDate>Thu, 26 Feb 2004 14:16:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/cron-and-date-command-options-for-output/m-p/3202261#M166841</guid>
      <dc:creator>Charlie Rubeor</dc:creator>
      <dc:date>2004-02-26T14:16:44Z</dc:date>
    </item>
  </channel>
</rss>

