<?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: using perl command in sh script cause error in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/using-perl-command-in-sh-script-cause-error/m-p/4904406#M702083</link>
    <description>many thanks for all&lt;BR /&gt;my script works fine now&lt;BR /&gt;kamal</description>
    <pubDate>Sat, 28 May 2005 07:22:59 GMT</pubDate>
    <dc:creator>kamal_15</dc:creator>
    <dc:date>2005-05-28T07:22:59Z</dc:date>
    <item>
      <title>using perl command in sh script cause error</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/using-perl-command-in-sh-script-cause-error/m-p/4904400#M702077</link>
      <description>hi all &lt;BR /&gt;i have hp-ux v 10.20&lt;BR /&gt;i writen sh script that interact with database.&lt;BR /&gt;&lt;BR /&gt;this script contain perl command:&lt;BR /&gt;arch_date=`perl -e 'use POSIX qw(strftime);$ft=strftime"%d-%m-%y",localtime '$min';printf($ft)'`&lt;BR /&gt;&lt;BR /&gt;i need this command to handle date.&lt;BR /&gt;may problem is:&lt;BR /&gt;when i execute this script through cron&lt;BR /&gt;the error messege appear in log file says&lt;BR /&gt;perl not found.&lt;BR /&gt;&lt;BR /&gt;and when i execute this script manualy (from command line ) it works good.&lt;BR /&gt;i don't know what is different&lt;BR /&gt;please help&lt;BR /&gt;&lt;BR /&gt;kamal&lt;BR /&gt;</description>
      <pubDate>Fri, 27 May 2005 11:32:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/using-perl-command-in-sh-script-cause-error/m-p/4904400#M702077</guid>
      <dc:creator>kamal_15</dc:creator>
      <dc:date>2005-05-27T11:32:36Z</dc:date>
    </item>
    <item>
      <title>Re: using perl command in sh script cause error</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/using-perl-command-in-sh-script-cause-error/m-p/4904401#M702078</link>
      <description>It's very simple. Cron's environment is very sparse. You need to set and export any needed environment variables before calling Perl. In your case, PATH needs to be set to include the location of Perl.</description>
      <pubDate>Fri, 27 May 2005 11:47:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/using-perl-command-in-sh-script-cause-error/m-p/4904401#M702078</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2005-05-27T11:47:20Z</dc:date>
    </item>
    <item>
      <title>Re: using perl command in sh script cause error</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/using-perl-command-in-sh-script-cause-error/m-p/4904402#M702079</link>
      <description>1. $min is undefined. passing that to localtime may cause *strange* results&lt;BR /&gt;&lt;BR /&gt;why use POSIX?&lt;BR /&gt;&lt;BR /&gt;# arch_date=`perl -e'@l=localtime;printf"%02d-%02d-%4d",$l[3],$l[4]+1,$l[5]%100'`&lt;BR /&gt;&lt;BR /&gt;If you *realy* want POSIX:&lt;BR /&gt;&lt;BR /&gt;# arch_date=`perl -MPOSIX=strftime -e'print strftime"%d-%m-%y",localtime'`&lt;BR /&gt;&lt;BR /&gt;Note that POSIX is slow.&lt;BR /&gt;&lt;BR /&gt;Enjoy, Have FUN! H.Merijn&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 27 May 2005 11:47:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/using-perl-command-in-sh-script-cause-error/m-p/4904402#M702079</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2005-05-27T11:47:58Z</dc:date>
    </item>
    <item>
      <title>Re: using perl command in sh script cause error</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/using-perl-command-in-sh-script-cause-error/m-p/4904403#M702080</link>
      <description>That is because you did not give full path of perl. Give it and you would be fine.&lt;BR /&gt;&lt;BR /&gt;Anil</description>
      <pubDate>Fri, 27 May 2005 11:48:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/using-perl-command-in-sh-script-cause-error/m-p/4904403#M702080</guid>
      <dc:creator>RAC_1</dc:creator>
      <dc:date>2005-05-27T11:48:33Z</dc:date>
    </item>
    <item>
      <title>Re: using perl command in sh script cause error</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/using-perl-command-in-sh-script-cause-error/m-p/4904404#M702081</link>
      <description>hi all&lt;BR /&gt;how can i edit cron env.&lt;BR /&gt;and when i edit my script with path of perl location.&lt;BR /&gt;the same error appear.&lt;BR /&gt;&lt;BR /&gt;please help&lt;BR /&gt;</description>
      <pubDate>Fri, 27 May 2005 12:38:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/using-perl-command-in-sh-script-cause-error/m-p/4904404#M702081</guid>
      <dc:creator>kamal_15</dc:creator>
      <dc:date>2005-05-27T12:38:09Z</dc:date>
    </item>
    <item>
      <title>Re: using perl command in sh script cause error</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/using-perl-command-in-sh-script-cause-error/m-p/4904405#M702082</link>
      <description>You can't directly edit the environment of cron but you can do something like this in the script called by cron:&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;&lt;BR /&gt;export PATH=${PATH}:/opt/perl/bin&lt;BR /&gt;&lt;BR /&gt;xxx=$(perl ....)&lt;BR /&gt;&lt;BR /&gt;You may also need to add -Idir arguments to the Perl invocation so that it knows where to find any needed modules.&lt;BR /&gt;</description>
      <pubDate>Fri, 27 May 2005 13:04:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/using-perl-command-in-sh-script-cause-error/m-p/4904405#M702082</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2005-05-27T13:04:17Z</dc:date>
    </item>
    <item>
      <title>Re: using perl command in sh script cause error</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/using-perl-command-in-sh-script-cause-error/m-p/4904406#M702083</link>
      <description>many thanks for all&lt;BR /&gt;my script works fine now&lt;BR /&gt;kamal</description>
      <pubDate>Sat, 28 May 2005 07:22:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/using-perl-command-in-sh-script-cause-error/m-p/4904406#M702083</guid>
      <dc:creator>kamal_15</dc:creator>
      <dc:date>2005-05-28T07:22:59Z</dc:date>
    </item>
  </channel>
</rss>

