<?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: Very simplistic script not working in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/very-simplistic-script-not-working/m-p/4930884#M409989</link>
    <description>Problem is,&lt;BR /&gt;&lt;BR /&gt;sapfn="SAP_PAYROLL_FILE_$yy$mm$dd_$mm$yy.CSV"&lt;BR /&gt;&lt;BR /&gt;$dd_$mm --&amp;gt; Trying to treat as $dd as variable and _ is not detecting. You remove that as,&lt;BR /&gt;&lt;BR /&gt;sapfn="SAP_PAYROLL_FILE_$yy$mm${dd}_$}mm}$yy.CSV"&lt;BR /&gt;&lt;BR /&gt;hth.&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Mon, 03 Oct 2005 06:30:11 GMT</pubDate>
    <dc:creator>Muthukumar_5</dc:creator>
    <dc:date>2005-10-03T06:30:11Z</dc:date>
    <item>
      <title>Very simplistic script not working</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/very-simplistic-script-not-working/m-p/4930882#M409987</link>
      <description>Hi, I've written a tiny little script and the output is not what I am expecting .... can anyone lend any advice please ?&lt;BR /&gt;&lt;BR /&gt;#!/bin/ksh&lt;BR /&gt;#&lt;BR /&gt;dd=`date '+%d'`&lt;BR /&gt;mm=`date '+%m'`&lt;BR /&gt;yy=`date | awk '{print $6}'`&lt;BR /&gt;#&lt;BR /&gt;echo "The current day is $dd"&lt;BR /&gt;echo "The current month is $mm"&lt;BR /&gt;echo "The current day is $yy"&lt;BR /&gt;#&lt;BR /&gt;sapfn="SAP_PAYROLL_FILE_$yy$mm$dd_$mm$yy.CSV"&lt;BR /&gt;echo $sapfn&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;The output from this script is not evaluating $dd and the underscore (_) within $sapfn properly..... this is the output :&lt;BR /&gt;&lt;BR /&gt;The current day is 03&lt;BR /&gt;The current month is 10&lt;BR /&gt;The current year is 2005&lt;BR /&gt;SAP_PAYROLL_FILE_200510102005.CSV &lt;BR /&gt;&lt;BR /&gt;Any idea why the variable $dd and the _ is not being evaulated correctly within $sapfn ?&lt;BR /&gt;Many thanks&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 03 Oct 2005 06:20:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/very-simplistic-script-not-working/m-p/4930882#M409987</guid>
      <dc:creator>Derek Brown</dc:creator>
      <dc:date>2005-10-03T06:20:36Z</dc:date>
    </item>
    <item>
      <title>Re: Very simplistic script not working</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/very-simplistic-script-not-working/m-p/4930883#M409988</link>
      <description>It is easy to do this simply as,&lt;BR /&gt;&lt;BR /&gt;# sapfn="SAP_PAYROLL_FILE_$(date +'%Y%m%d_%m%Y').CSV"&lt;BR /&gt;# echo $sapfn&lt;BR /&gt;SAP_PAYROLL_FILE_20051003_102005.CSV&lt;BR /&gt;&lt;BR /&gt;hth.</description>
      <pubDate>Mon, 03 Oct 2005 06:26:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/very-simplistic-script-not-working/m-p/4930883#M409988</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2005-10-03T06:26:32Z</dc:date>
    </item>
    <item>
      <title>Re: Very simplistic script not working</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/very-simplistic-script-not-working/m-p/4930884#M409989</link>
      <description>Problem is,&lt;BR /&gt;&lt;BR /&gt;sapfn="SAP_PAYROLL_FILE_$yy$mm$dd_$mm$yy.CSV"&lt;BR /&gt;&lt;BR /&gt;$dd_$mm --&amp;gt; Trying to treat as $dd as variable and _ is not detecting. You remove that as,&lt;BR /&gt;&lt;BR /&gt;sapfn="SAP_PAYROLL_FILE_$yy$mm${dd}_$}mm}$yy.CSV"&lt;BR /&gt;&lt;BR /&gt;hth.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 03 Oct 2005 06:30:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/very-simplistic-script-not-working/m-p/4930884#M409989</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2005-10-03T06:30:11Z</dc:date>
    </item>
    <item>
      <title>Re: Very simplistic script not working</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/very-simplistic-script-not-working/m-p/4930885#M409990</link>
      <description>or use two variables.&lt;BR /&gt;&lt;BR /&gt;#!/bin/ksh&lt;BR /&gt;#&lt;BR /&gt;dd=`date '+%d'`&lt;BR /&gt;mm=`date '+%m'`&lt;BR /&gt;yy=`date | awk '{print $6}'`&lt;BR /&gt;#&lt;BR /&gt;echo "The current day is $dd"&lt;BR /&gt;echo "The current month is $mm"&lt;BR /&gt;echo "The current day is $yy"&lt;BR /&gt;#&lt;BR /&gt;sapfn="SAP_PAYROLL_FILE_$yy$mm$dd"&lt;BR /&gt;sapfnex="_$mm$yy.CSV"&lt;BR /&gt;echo "$sapfn$sapfnex"&lt;BR /&gt;&lt;BR /&gt;tmp# ./d&lt;BR /&gt;The current day is 03&lt;BR /&gt;The current month is 10&lt;BR /&gt;The current day is 2005&lt;BR /&gt;SAP_PAYROLL_FILE_20051003_102005.CSV&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Robert-Jan</description>
      <pubDate>Mon, 03 Oct 2005 06:30:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/very-simplistic-script-not-working/m-p/4930885#M409990</guid>
      <dc:creator>Robert-Jan Goossens_1</dc:creator>
      <dc:date>2005-10-03T06:30:36Z</dc:date>
    </item>
    <item>
      <title>Re: Very simplistic script not working</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/very-simplistic-script-not-working/m-p/4930886#M409991</link>
      <description>Derek:&lt;BR /&gt;&lt;BR /&gt;You can avoid variable name versus variable substitution ambiquity by enclosing the variable names in curly braces, like this:&lt;BR /&gt;&lt;BR /&gt;sapfn="SAP_PAYROLL_FILE_${yy}${mm}${dd}_${mm}${yy}.CSV"&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Mon, 03 Oct 2005 06:31:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/very-simplistic-script-not-working/m-p/4930886#M409991</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2005-10-03T06:31:12Z</dc:date>
    </item>
    <item>
      <title>Re: Very simplistic script not working</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/very-simplistic-script-not-working/m-p/4930887#M409992</link>
      <description>As an addition to other replies&lt;BR /&gt;try to take a little bit care while using&lt;BR /&gt;and naming variable...&lt;BR /&gt;For example;&lt;BR /&gt;dd=`date '+%d'`&lt;BR /&gt;and please try to see man page of dd.&lt;BR /&gt;"dd" is one the unix command so system may&lt;BR /&gt;easily mixe it...&lt;BR /&gt;:-)&lt;BR /&gt;&lt;BR /&gt;Good Luck,&lt;BR /&gt;</description>
      <pubDate>Mon, 03 Oct 2005 06:50:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/very-simplistic-script-not-working/m-p/4930887#M409992</guid>
      <dc:creator>Cem Tugrul</dc:creator>
      <dc:date>2005-10-03T06:50:35Z</dc:date>
    </item>
    <item>
      <title>Re: Very simplistic script not working</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/very-simplistic-script-not-working/m-p/4930888#M409993</link>
      <description>Brilliant answers ... thank you</description>
      <pubDate>Mon, 03 Oct 2005 06:50:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/very-simplistic-script-not-working/m-p/4930888#M409993</guid>
      <dc:creator>Derek Brown</dc:creator>
      <dc:date>2005-10-03T06:50:38Z</dc:date>
    </item>
    <item>
      <title>Re: Very simplistic script not working</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/very-simplistic-script-not-working/m-p/4930889#M409994</link>
      <description>no points for me&lt;BR /&gt;:-(</description>
      <pubDate>Mon, 03 Oct 2005 06:59:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/very-simplistic-script-not-working/m-p/4930889#M409994</guid>
      <dc:creator>Cem Tugrul</dc:creator>
      <dc:date>2005-10-03T06:59:20Z</dc:date>
    </item>
  </channel>
</rss>

