<?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: simple script is failing in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/simple-script-is-failing/m-p/4383363#M349026</link>
    <description>The aliases only exist inside your script. Once the script ends so do the aliases. Better off putting them in your .profile, .login etc. as appropriate.&lt;BR /&gt;&lt;BR /&gt;Mark Syder (like the drink but spelt different)</description>
    <pubDate>Thu, 19 Mar 2009 12:20:19 GMT</pubDate>
    <dc:creator>MarkSyder</dc:creator>
    <dc:date>2009-03-19T12:20:19Z</dc:date>
    <item>
      <title>simple script is failing</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/simple-script-is-failing/m-p/4383362#M349025</link>
      <description>Hi All,&lt;BR /&gt;&lt;BR /&gt;I was running the below script and somehow it dosent work:-&lt;BR /&gt;&lt;BR /&gt;cat myscript.sh&lt;BR /&gt;#!/usr/bin/ksh&lt;BR /&gt;echo "hello world"&lt;BR /&gt;alias 'ps=ps -aef'&lt;BR /&gt;alias -x 'bmw=ls -rt'&lt;BR /&gt;&lt;BR /&gt;Globe1&amp;gt;./myscript.sh&lt;BR /&gt;hello world&lt;BR /&gt;Globe1&amp;gt; bmw&lt;BR /&gt;ksh: bmw:  not found&lt;BR /&gt;&lt;BR /&gt;Plz advice&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 19 Mar 2009 12:15:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/simple-script-is-failing/m-p/4383362#M349025</guid>
      <dc:creator>Grayh</dc:creator>
      <dc:date>2009-03-19T12:15:08Z</dc:date>
    </item>
    <item>
      <title>Re: simple script is failing</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/simple-script-is-failing/m-p/4383363#M349026</link>
      <description>The aliases only exist inside your script. Once the script ends so do the aliases. Better off putting them in your .profile, .login etc. as appropriate.&lt;BR /&gt;&lt;BR /&gt;Mark Syder (like the drink but spelt different)</description>
      <pubDate>Thu, 19 Mar 2009 12:20:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/simple-script-is-failing/m-p/4383363#M349026</guid>
      <dc:creator>MarkSyder</dc:creator>
      <dc:date>2009-03-19T12:20:19Z</dc:date>
    </item>
    <item>
      <title>Re: simple script is failing</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/simple-script-is-failing/m-p/4383364#M349027</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;When you ran as:&lt;BR /&gt;&lt;BR /&gt;# ./myscript.sh&lt;BR /&gt;&lt;BR /&gt;...you executed in your own environment. A child process cannot propagate variables to its pareent.&lt;BR /&gt;&lt;BR /&gt;Instead, do:&lt;BR /&gt;&lt;BR /&gt;# . ./myscript.sh&lt;BR /&gt;&lt;BR /&gt;...and then you can use the 'bmw' alias.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Thu, 19 Mar 2009 12:21:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/simple-script-is-failing/m-p/4383364#M349027</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2009-03-19T12:21:21Z</dc:date>
    </item>
    <item>
      <title>Re: simple script is failing</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/simple-script-is-failing/m-p/4383365#M349028</link>
      <description>I do not have write permissions on the .profile and .login...&lt;BR /&gt;&lt;BR /&gt;I type alias after running the script&lt;BR /&gt;&lt;BR /&gt;and my alias dosent work... &lt;BR /&gt;&lt;BR /&gt;Plz help me with a small example&lt;BR /&gt;&lt;BR /&gt;thank you</description>
      <pubDate>Thu, 19 Mar 2009 12:26:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/simple-script-is-failing/m-p/4383365#M349028</guid>
      <dc:creator>Grayh</dc:creator>
      <dc:date>2009-03-19T12:26:55Z</dc:date>
    </item>
    <item>
      <title>Re: simple script is failing</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/simple-script-is-failing/m-p/4383366#M349029</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I see you are trying to use:&lt;BR /&gt;&lt;BR /&gt;alias -x&lt;BR /&gt;&lt;BR /&gt;I guess with the aim that the alias is propagated to another shell.&lt;BR /&gt;&lt;BR /&gt;This won't work as you've seen.  See this part of ksh man page:&lt;BR /&gt;&lt;BR /&gt;      Exported aliases remain in effect for subshells but must be&lt;BR /&gt;      reinitialized for separate invocations of the shell (see Invoking ksh&lt;BR /&gt;      below).&lt;BR /&gt;&lt;BR /&gt;You would probably be better just sourcing in a file to set them for each new shell:&lt;BR /&gt;&lt;BR /&gt;. /file&lt;BR /&gt;&lt;BR /&gt;HTH, Paul</description>
      <pubDate>Thu, 19 Mar 2009 12:27:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/simple-script-is-failing/m-p/4383366#M349029</guid>
      <dc:creator>Paul McCleary</dc:creator>
      <dc:date>2009-03-19T12:27:46Z</dc:date>
    </item>
    <item>
      <title>Re: simple script is failing</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/simple-script-is-failing/m-p/4383367#M349030</link>
      <description>Thanks JRF... It worked&lt;BR /&gt;&lt;BR /&gt;I have learnt something now</description>
      <pubDate>Thu, 19 Mar 2009 12:28:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/simple-script-is-failing/m-p/4383367#M349030</guid>
      <dc:creator>Grayh</dc:creator>
      <dc:date>2009-03-19T12:28:13Z</dc:date>
    </item>
    <item>
      <title>Re: simple script is failing</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/simple-script-is-failing/m-p/4383368#M349031</link>
      <description>If you can write to your home directory, you can always fix the permissions of any files in it, even if you don't have the ownership of the file.&lt;BR /&gt;&lt;BR /&gt;Just copy the original to a new name (you will own the new copy)...&lt;BR /&gt;&lt;BR /&gt;cp .profile .profile.new&lt;BR /&gt;&lt;BR /&gt;... delete the original...&lt;BR /&gt;&lt;BR /&gt;rm .profile&lt;BR /&gt;&lt;BR /&gt;... and rename the copy you made back to original name.&lt;BR /&gt;&lt;BR /&gt;mv .profile.new .profile&lt;BR /&gt;&lt;BR /&gt;If the permissions of the file are -r--r--r-- but you are the owner of the file, there is no need to do any copying. You can simply give yourself the write permission:&lt;BR /&gt;&lt;BR /&gt;chmod u+w .profile&lt;BR /&gt;&lt;BR /&gt;MK</description>
      <pubDate>Thu, 19 Mar 2009 13:08:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/simple-script-is-failing/m-p/4383368#M349031</guid>
      <dc:creator>Matti_Kurkela</dc:creator>
      <dc:date>2009-03-19T13:08:14Z</dc:date>
    </item>
  </channel>
</rss>

