<?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: ksh program within backquotes won't work without having preceding &amp;quot;dot&amp;quot; (.) in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/ksh-program-within-backquotes-won-t-work-without-having/m-p/4043016#M743545</link>
    <description>Since the back-tick syntax is somewhat deprecated, try the $(..) syntax.&lt;BR /&gt;&lt;BR /&gt;idpw=$(. /usr/local/bin/idpw)&lt;BR /&gt;echo $idpw&lt;BR /&gt;&lt;BR /&gt;or&lt;BR /&gt;&lt;BR /&gt;idpw=$(/usr/local/bin/idpw)&lt;BR /&gt;echo $idpw</description>
    <pubDate>Tue, 24 Jul 2007 17:00:37 GMT</pubDate>
    <dc:creator>Patrick Wallek</dc:creator>
    <dc:date>2007-07-24T17:00:37Z</dc:date>
    <item>
      <title>ksh program within backquotes won't work without having preceding "dot" (.)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ksh-program-within-backquotes-won-t-work-without-having/m-p/4043011#M743540</link>
      <description>Experts,&lt;BR /&gt;&lt;BR /&gt;I'm trying to help an Informatica PowerCenter (ETL tool) developer - and I'm out of ideas.  Here's the scenario (3 files, all 777 perms until I resolve this):&lt;BR /&gt;&lt;BR /&gt;ksh script -- /usr/local/bin/idpw -- has one line in it:&lt;BR /&gt;&lt;BR /&gt;echo "MyID/MyPW"&lt;BR /&gt;&lt;BR /&gt;ksh script -- /scripts/foo.WORKS -- has two lines in it:&lt;BR /&gt;&lt;BR /&gt;idpw=`. /usr/local/bin/idpw`&lt;BR /&gt;echo $idpw&lt;BR /&gt;&lt;BR /&gt;ksh script -- /scripts/foo.WONT_WORK -- has two lines in it:&lt;BR /&gt;&lt;BR /&gt;idpw=`/usr/local/bin/idpw`&lt;BR /&gt;echo $idpw&lt;BR /&gt;&lt;BR /&gt;BOTH SCRIPTS WORK FROM COMMAND-LINE (ksh).&lt;BR /&gt;&lt;BR /&gt;But when the scripts are submitted thru Informatica tool, 2nd script returns NULL.  All Informatica processes started with same ID/environment in which the commands work INTERACTIVELY.&lt;BR /&gt;&lt;BR /&gt;What gives?  Why is the "dot" REQUIRED for this to function?  I wouldn't much care - except for the fact that we have a TON of legacy code that doesn't have the "dot" within the backquotes - and we'd rather not find and update all of those various scripts (even though, I know, find/sed would work for this).&lt;BR /&gt;&lt;BR /&gt;Thanks in advance for any ideas/solutions!!!&lt;BR /&gt;&lt;BR /&gt;Later,&lt;BR /&gt;Ben Chapman&lt;BR /&gt;bchapman@telcordia.com</description>
      <pubDate>Tue, 24 Jul 2007 16:06:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ksh-program-within-backquotes-won-t-work-without-having/m-p/4043011#M743540</guid>
      <dc:creator>B. Chapman</dc:creator>
      <dc:date>2007-07-24T16:06:24Z</dc:date>
    </item>
    <item>
      <title>Re: ksh program within backquotes won't work without having preceding "dot" (.)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ksh-program-within-backquotes-won-t-work-without-having/m-p/4043012#M743541</link>
      <description>&amp;gt; ksh script [...]&lt;BR /&gt;&lt;BR /&gt;What makes it a "ksh script" if it doesn't&lt;BR /&gt;have something like:&lt;BR /&gt;&lt;BR /&gt;#!/bin/ksh&lt;BR /&gt;&lt;BR /&gt;as its first line?</description>
      <pubDate>Tue, 24 Jul 2007 16:19:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ksh-program-within-backquotes-won-t-work-without-having/m-p/4043012#M743541</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2007-07-24T16:19:01Z</dc:date>
    </item>
    <item>
      <title>Re: ksh program within backquotes won't work without having preceding "dot" (.)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ksh-program-within-backquotes-won-t-work-without-having/m-p/4043013#M743542</link>
      <description>The first thing that I would do is to add a "shbang" line as the very first line of your scripts -- it was sloppy not to have one in the first place.&lt;BR /&gt;&lt;BR /&gt;e.g.&lt;BR /&gt;#!/usr/bin/ksh&lt;BR /&gt;&lt;BR /&gt;echo "Stupid Stuff"&lt;BR /&gt;&lt;BR /&gt;Of course, this assumes this PowerCenter stuff observes the shbang convention.</description>
      <pubDate>Tue, 24 Jul 2007 16:24:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ksh-program-within-backquotes-won-t-work-without-having/m-p/4043013#M743542</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2007-07-24T16:24:25Z</dc:date>
    </item>
    <item>
      <title>Re: ksh program within backquotes won't work without having preceding "dot" (.)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ksh-program-within-backquotes-won-t-work-without-having/m-p/4043014#M743543</link>
      <description>I'm sorry - it's kshell all the way.  All 3 scripts have "#!/usr/bin/ksh" as first line, and, startup shell for all HP-UX accounts - most importantly - the Informatica account - is /usr/bin/ksh.&lt;BR /&gt;&lt;BR /&gt;That was stupid of me not to mention that - I just wanted to simplify/shorten the scripts for the post.</description>
      <pubDate>Tue, 24 Jul 2007 16:44:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ksh-program-within-backquotes-won-t-work-without-having/m-p/4043014#M743543</guid>
      <dc:creator>B. Chapman</dc:creator>
      <dc:date>2007-07-24T16:44:14Z</dc:date>
    </item>
    <item>
      <title>Re: ksh program within backquotes won't work without having preceding "dot" (.)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ksh-program-within-backquotes-won-t-work-without-having/m-p/4043015#M743544</link>
      <description>I guess I should also mention something else regarding informatica:  These scripts have PRE and POST session scripts, and they have always executed with no problems in OUR CURRENT (and previous) Informatica versions.  We have taken a copy of our production Informatica 7.x "system", put it on a sandbox, and upgraded to Informatica 8.x.&lt;BR /&gt;&lt;BR /&gt;And this is where we're finding that the behavior is different - that is - backquoted script calls in shell scripts aren't being executed/interpreted/run/whatever.&lt;BR /&gt;&lt;BR /&gt;We have opened a ticket with Informatica - and they (so far) have not been able to help out.  Hence why I'm hitting up the gurus!</description>
      <pubDate>Tue, 24 Jul 2007 16:49:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ksh-program-within-backquotes-won-t-work-without-having/m-p/4043015#M743544</guid>
      <dc:creator>B. Chapman</dc:creator>
      <dc:date>2007-07-24T16:49:23Z</dc:date>
    </item>
    <item>
      <title>Re: ksh program within backquotes won't work without having preceding "dot" (.)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ksh-program-within-backquotes-won-t-work-without-having/m-p/4043016#M743545</link>
      <description>Since the back-tick syntax is somewhat deprecated, try the $(..) syntax.&lt;BR /&gt;&lt;BR /&gt;idpw=$(. /usr/local/bin/idpw)&lt;BR /&gt;echo $idpw&lt;BR /&gt;&lt;BR /&gt;or&lt;BR /&gt;&lt;BR /&gt;idpw=$(/usr/local/bin/idpw)&lt;BR /&gt;echo $idpw</description>
      <pubDate>Tue, 24 Jul 2007 17:00:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ksh-program-within-backquotes-won-t-work-without-having/m-p/4043016#M743545</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2007-07-24T17:00:37Z</dc:date>
    </item>
    <item>
      <title>Re: ksh program within backquotes won't work without having preceding "dot" (.)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ksh-program-within-backquotes-won-t-work-without-having/m-p/4043017#M743546</link>
      <description>Patrick - thanks for the suggestion - but the idea is to get the pre-existing "legacy" code working without having to make any modifications.&lt;BR /&gt;&lt;BR /&gt;And currently, all of our code has a BUNCH of lines with backquoted (tickquoted) programs:&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/ksh&lt;BR /&gt;.&lt;BR /&gt;.&lt;BR /&gt;IdPw=`/usr/local/bin/get_id_pw.sh`&lt;BR /&gt;.&lt;BR /&gt;.&lt;BR /&gt;&lt;BR /&gt;Which I know I can easily fix by using a dot (.), as in:&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/ksh&lt;BR /&gt;.&lt;BR /&gt;.&lt;BR /&gt;&lt;BR /&gt;IdPw=`. /usr/local/bin/get_id_pw.sh`&lt;BR /&gt;.&lt;BR /&gt;.&lt;BR /&gt;&lt;BR /&gt;(or by using your more up-to-date convention)&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/ksh&lt;BR /&gt;.&lt;BR /&gt;.&lt;BR /&gt;IdPw=$(/usr/local/bin/get_id_pw.sh)&lt;BR /&gt;.&lt;BR /&gt;.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;But we're trying to avoid a massive code-update.</description>
      <pubDate>Tue, 24 Jul 2007 17:10:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ksh-program-within-backquotes-won-t-work-without-having/m-p/4043017#M743546</guid>
      <dc:creator>B. Chapman</dc:creator>
      <dc:date>2007-07-24T17:10:04Z</dc:date>
    </item>
    <item>
      <title>Re: ksh program within backquotes won't work without having preceding "dot" (.)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ksh-program-within-backquotes-won-t-work-without-having/m-p/4043018#M743547</link>
      <description>Try adding the eval builtin command to the "/usr/local/bin/idpw" script to force the shell to make another pass over it and execute it i.e.&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/ksh&lt;BR /&gt;&lt;BR /&gt;eval echo "MyID/MyPW"</description>
      <pubDate>Tue, 24 Jul 2007 17:12:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ksh-program-within-backquotes-won-t-work-without-having/m-p/4043018#M743547</guid>
      <dc:creator>Sandman!</dc:creator>
      <dc:date>2007-07-24T17:12:18Z</dc:date>
    </item>
    <item>
      <title>Re: ksh program within backquotes won't work without having preceding "dot" (.)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ksh-program-within-backquotes-won-t-work-without-having/m-p/4043019#M743548</link>
      <description>The only difference the dot should make is that the process is executed in the current shell rather than as a separate process. This also implies that a dot'ed command cannot contain an exit or return statement as that would immediately terminate the current process.&lt;BR /&gt;&lt;BR /&gt;I would add "set -x" just after your shbang lines in the called and calling scripts and observe the output. Note that the set -x output goes to stderr rather than stdout.&lt;BR /&gt;&lt;BR /&gt;I would also try running as the POSIX shell #!/usr/bin/sh to see if the behavior changes.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 24 Jul 2007 17:15:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ksh-program-within-backquotes-won-t-work-without-having/m-p/4043019#M743548</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2007-07-24T17:15:45Z</dc:date>
    </item>
    <item>
      <title>Re: ksh program within backquotes won't work without having preceding "dot" (.)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ksh-program-within-backquotes-won-t-work-without-having/m-p/4043020#M743549</link>
      <description>So, just to be clear, your script which "has&lt;BR /&gt;one line in it" actually has two lines in it,&lt;BR /&gt;and we really have no clear description of&lt;BR /&gt;what this "Informatica tool" really does with&lt;BR /&gt;the stuff you give it?&lt;BR /&gt;&lt;BR /&gt;Knowing nothing, I'd say that you need to get&lt;BR /&gt;more info from the Informatica folks to find&lt;BR /&gt;out exactly what it does when you tell it to&lt;BR /&gt;do whatever you're telling it to do.&lt;BR /&gt;Particularly helpful might be knowing what&lt;BR /&gt;the new version does differently from the&lt;BR /&gt;older version(s).  Trying to diagnose a&lt;BR /&gt;system which contains a black box along a&lt;BR /&gt;critical path sounds like a good task for a&lt;BR /&gt;talented psychic.  (There may be one&lt;BR /&gt;following this thread, so you never know, but&lt;BR /&gt;my guess is that you'll need to find someone&lt;BR /&gt;who can peer into the black box.)</description>
      <pubDate>Tue, 24 Jul 2007 17:23:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ksh-program-within-backquotes-won-t-work-without-having/m-p/4043020#M743549</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2007-07-24T17:23:39Z</dc:date>
    </item>
    <item>
      <title>Re: ksh program within backquotes won't work without having preceding "dot" (.)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ksh-program-within-backquotes-won-t-work-without-having/m-p/4043021#M743550</link>
      <description>&amp;gt;Steven: Trying to diagnose a system which contains a black box along a critical path sounds like a good task for a talented psychic. (There may be one following this thread, but my guess is that you'll need to find someone who can peer into the black box.)&lt;BR /&gt;&lt;BR /&gt;Psychics use quantum tunneling (tusc) to look into black boxes.  ;-)&lt;BR /&gt;&lt;BR /&gt;One difference about "." is that the file doesn't have to be executable.  But Ben mentioned 777 permissions.</description>
      <pubDate>Wed, 25 Jul 2007 00:29:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ksh-program-within-backquotes-won-t-work-without-having/m-p/4043021#M743550</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2007-07-25T00:29:27Z</dc:date>
    </item>
    <item>
      <title>Re: ksh program within backquotes won't work without having preceding "dot" (.)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ksh-program-within-backquotes-won-t-work-without-having/m-p/4043022#M743551</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I'd like to wether your backtic script is really executed:&lt;BR /&gt;add something like this to /usr/local/bin/idpw:&lt;BR /&gt;print i am idpw &amp;gt;/tmp/logfile$$&lt;BR /&gt;&lt;BR /&gt;and watch for the logfile.&lt;BR /&gt;Maybe the stderr is devnulled by the calling environment so error messages are invisible?&lt;BR /&gt;&lt;BR /&gt;mfG Peter</description>
      <pubDate>Wed, 25 Jul 2007 01:46:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ksh-program-within-backquotes-won-t-work-without-having/m-p/4043022#M743551</guid>
      <dc:creator>Peter Nikitka</dc:creator>
      <dc:date>2007-07-25T01:46:38Z</dc:date>
    </item>
  </channel>
</rss>

