<?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 question involving dates in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/script-question-involving-dates/m-p/4178543#M322079</link>
    <description>Hello! &lt;BR /&gt;I know how busy everyone is.. but I've got a question that I would sure be grateful if anyone has an easy answer to.. &lt;BR /&gt;I've got to create a script to copy a number of files everyday from one location to another.. &lt;BR /&gt;the location of the files will change from one day to the next.. the files will always be located in a subdirectory named for the day they were created, for example, /usr/local/20080411 or 2080410, etc.. &lt;BR /&gt;Can anyone give me some advice for how to put that in a script so that it will be incremented daily? &lt;BR /&gt;&lt;BR /&gt;Many thanks for any help you can give.. &lt;BR /&gt;&lt;BR /&gt;John Henrikson &lt;BR /&gt;</description>
    <pubDate>Fri, 11 Apr 2008 15:33:27 GMT</pubDate>
    <dc:creator>John Henrikson</dc:creator>
    <dc:date>2008-04-11T15:33:27Z</dc:date>
    <item>
      <title>script question involving dates</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-question-involving-dates/m-p/4178543#M322079</link>
      <description>Hello! &lt;BR /&gt;I know how busy everyone is.. but I've got a question that I would sure be grateful if anyone has an easy answer to.. &lt;BR /&gt;I've got to create a script to copy a number of files everyday from one location to another.. &lt;BR /&gt;the location of the files will change from one day to the next.. the files will always be located in a subdirectory named for the day they were created, for example, /usr/local/20080411 or 2080410, etc.. &lt;BR /&gt;Can anyone give me some advice for how to put that in a script so that it will be incremented daily? &lt;BR /&gt;&lt;BR /&gt;Many thanks for any help you can give.. &lt;BR /&gt;&lt;BR /&gt;John Henrikson &lt;BR /&gt;</description>
      <pubDate>Fri, 11 Apr 2008 15:33:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-question-involving-dates/m-p/4178543#M322079</guid>
      <dc:creator>John Henrikson</dc:creator>
      <dc:date>2008-04-11T15:33:27Z</dc:date>
    </item>
    <item>
      <title>Re: script question involving dates</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-question-involving-dates/m-p/4178544#M322080</link>
      <description>To get the date in the format you need you need  to use:&lt;BR /&gt;&lt;BR /&gt;date +%Y%m%d&lt;BR /&gt;&lt;BR /&gt;This would yeild:&lt;BR /&gt;&lt;BR /&gt;20080411&lt;BR /&gt;&lt;BR /&gt;To use this in a script you would assign it to a variable and then use that variable in your CD command.&lt;BR /&gt;&lt;BR /&gt;CURDATE=$(/usr/bin/date +%Y%m%d)&lt;BR /&gt;cd /usr/local/${CURDATE}&lt;BR /&gt;&lt;BR /&gt;See the date man page for details on how the command above works.</description>
      <pubDate>Fri, 11 Apr 2008 15:57:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-question-involving-dates/m-p/4178544#M322080</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2008-04-11T15:57:55Z</dc:date>
    </item>
  </channel>
</rss>

