<?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: Script problem in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/2548760#M875644</link>
    <description>Hi Pete&lt;BR /&gt;&lt;BR /&gt;I use this date info as such;-&lt;BR /&gt;&lt;BR /&gt;cat /avro/results |grep $yestD| awk (etc)&lt;BR /&gt;&lt;BR /&gt;should this be used as:-&lt;BR /&gt;&lt;BR /&gt;cat /avro/results |grep "$yestD"| awk (etc)&lt;BR /&gt;&lt;BR /&gt;Paula</description>
    <pubDate>Wed, 04 Jul 2001 14:33:46 GMT</pubDate>
    <dc:creator>Paula J Frazer-Campbell</dc:creator>
    <dc:date>2001-07-04T14:33:46Z</dc:date>
    <item>
      <title>Script problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/2548757#M875641</link>
      <description>Hi to all&lt;BR /&gt;&lt;BR /&gt;I have a script wich call a script to get and use yesterdays date&lt;BR /&gt;&lt;BR /&gt;from prompt&lt;BR /&gt;#./pastdate 1&lt;BR /&gt;#Jul  3  (note two spaces)&lt;BR /&gt;&lt;BR /&gt;This is the  output I require and this script works fine&lt;BR /&gt;&lt;BR /&gt;When I call this script from my main script and echo out the result I get:-&lt;BR /&gt;&lt;BR /&gt;#Jul 3 (note single space)&lt;BR /&gt;&lt;BR /&gt;--------------From Script-----------&lt;BR /&gt;yestd=`/pastdate 1`&lt;BR /&gt;echo $yestD&lt;BR /&gt;------------------------------------&lt;BR /&gt;&lt;BR /&gt;I require my output with the double space for dates less than 10 (as per std Unix date) so that I can use it to grep out credit card transaction carried out on a particular date.&lt;BR /&gt;&lt;BR /&gt;So why is my date script correct when ran from the command prompt, but when it is called from within another script it presents the data with a space missing??&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Help Please&lt;BR /&gt;&lt;BR /&gt;Paula                            &lt;BR /&gt;</description>
      <pubDate>Wed, 04 Jul 2001 14:14:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/2548757#M875641</guid>
      <dc:creator>Paula J Frazer-Campbell</dc:creator>
      <dc:date>2001-07-04T14:14:50Z</dc:date>
    </item>
    <item>
      <title>Re: Script problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/2548758#M875642</link>
      <description>Paula,&lt;BR /&gt;&lt;BR /&gt;You have to put:&lt;BR /&gt; echo "$yestD"&lt;BR /&gt;&lt;BR /&gt;to treat the variable as a single string</description>
      <pubDate>Wed, 04 Jul 2001 14:24:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/2548758#M875642</guid>
      <dc:creator>Pete Ellis</dc:creator>
      <dc:date>2001-07-04T14:24:46Z</dc:date>
    </item>
    <item>
      <title>Re: Script problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/2548759#M875643</link>
      <description>Hi,&lt;BR /&gt;I can say what is the problem only if i see ur script.&lt;BR /&gt;&lt;BR /&gt;But to avoid this u can insert following lines in ur script:&lt;BR /&gt;------------------------------------&lt;BR /&gt;mon=`echo $yestD | cut -d " " -f1`&lt;BR /&gt;day=`echo $yestD | cut -d " " -f2`&lt;BR /&gt;if [ $day -lt 10 ]&lt;BR /&gt;then&lt;BR /&gt;$yestD="$mon\ \ $day"&lt;BR /&gt;else&lt;BR /&gt;$yestD="$mon\ $day"&lt;BR /&gt;fi&lt;BR /&gt;-------------------------------------&lt;BR /&gt;&lt;BR /&gt;Cheers...&lt;BR /&gt;Satish.</description>
      <pubDate>Wed, 04 Jul 2001 14:32:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/2548759#M875643</guid>
      <dc:creator>Satish Y</dc:creator>
      <dc:date>2001-07-04T14:32:24Z</dc:date>
    </item>
    <item>
      <title>Re: Script problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/2548760#M875644</link>
      <description>Hi Pete&lt;BR /&gt;&lt;BR /&gt;I use this date info as such;-&lt;BR /&gt;&lt;BR /&gt;cat /avro/results |grep $yestD| awk (etc)&lt;BR /&gt;&lt;BR /&gt;should this be used as:-&lt;BR /&gt;&lt;BR /&gt;cat /avro/results |grep "$yestD"| awk (etc)&lt;BR /&gt;&lt;BR /&gt;Paula</description>
      <pubDate>Wed, 04 Jul 2001 14:33:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/2548760#M875644</guid>
      <dc:creator>Paula J Frazer-Campbell</dc:creator>
      <dc:date>2001-07-04T14:33:46Z</dc:date>
    </item>
    <item>
      <title>Re: Script problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/2548761#M875645</link>
      <description>Pete &lt;BR /&gt;Thanks that fixed it.&lt;BR /&gt;&lt;BR /&gt;Paula</description>
      <pubDate>Wed, 04 Jul 2001 14:37:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/2548761#M875645</guid>
      <dc:creator>Paula J Frazer-Campbell</dc:creator>
      <dc:date>2001-07-04T14:37:51Z</dc:date>
    </item>
    <item>
      <title>Re: Script problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/2548762#M875646</link>
      <description>Paula,&lt;BR /&gt;&lt;BR /&gt;That looks good to me! grep would treat look for the first word jul and think 3 was a file</description>
      <pubDate>Wed, 04 Jul 2001 14:42:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-problem/m-p/2548762#M875646</guid>
      <dc:creator>Pete Ellis</dc:creator>
      <dc:date>2001-07-04T14:42:18Z</dc:date>
    </item>
  </channel>
</rss>

