<?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: alias command in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/alias-command/m-p/4864193#M862283</link>
    <description>The "whence" command under ksh will display where a command is located or for an alias it will display the alias mapping.&lt;BR /&gt; &lt;BR /&gt;HTH&lt;BR /&gt; &lt;BR /&gt;-- Rod Hills</description>
    <pubDate>Wed, 06 Oct 2004 10:43:32 GMT</pubDate>
    <dc:creator>Rodney Hills</dc:creator>
    <dc:date>2004-10-06T10:43:32Z</dc:date>
    <item>
      <title>alias command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/alias-command/m-p/4864187#M862277</link>
      <description>When using the alias command for setting in .profile, is there a way to display the command thats going to be executed instead of executing it right away ?&lt;BR /&gt;</description>
      <pubDate>Wed, 06 Oct 2004 09:26:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/alias-command/m-p/4864187#M862277</guid>
      <dc:creator>MikeL_4</dc:creator>
      <dc:date>2004-10-06T09:26:07Z</dc:date>
    </item>
    <item>
      <title>Re: alias command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/alias-command/m-p/4864188#M862278</link>
      <description>Not too sure if I know what you want - but if you just enter:&lt;BR /&gt;&lt;BR /&gt;alias&lt;BR /&gt;&lt;BR /&gt;it will tell you all the aliases configured...&lt;BR /&gt;&lt;BR /&gt;Example:&lt;BR /&gt;&lt;BR /&gt;# alias&lt;BR /&gt;autoload='typeset -fu'&lt;BR /&gt;command='command '&lt;BR /&gt;date=/bin/date&lt;BR /&gt;functions='typeset -f'&lt;BR /&gt;history='fc -l'&lt;BR /&gt;integer='typeset -i'&lt;BR /&gt;local=typeset&lt;BR /&gt;nohup='nohup '&lt;BR /&gt;r='fc -e -'&lt;BR /&gt;stop='kill -STOP'&lt;BR /&gt;suspend='kill -STOP $$'&lt;BR /&gt;type='whence -v'&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Rgds...Geoff&lt;BR /&gt;</description>
      <pubDate>Wed, 06 Oct 2004 09:28:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/alias-command/m-p/4864188#M862278</guid>
      <dc:creator>Geoff Wild</dc:creator>
      <dc:date>2004-10-06T09:28:38Z</dc:date>
    </item>
    <item>
      <title>Re: alias command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/alias-command/m-p/4864189#M862279</link>
      <description>and alias aliasName will just give the alias for just that alias.&lt;BR /&gt;&lt;BR /&gt;and typeset -f will list the shell functions</description>
      <pubDate>Wed, 06 Oct 2004 09:31:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/alias-command/m-p/4864189#M862279</guid>
      <dc:creator>c_51</dc:creator>
      <dc:date>2004-10-06T09:31:58Z</dc:date>
    </item>
    <item>
      <title>Re: alias command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/alias-command/m-p/4864190#M862280</link>
      <description>&lt;BR /&gt;If I had an alias defined: command='ls -al /user ' When I enter the alias, command&lt;BR /&gt;don't execute the ls -al /user but rather display the line so I could modify it if needed to say: ls -al /tmp&lt;BR /&gt;</description>
      <pubDate>Wed, 06 Oct 2004 09:33:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/alias-command/m-p/4864190#M862280</guid>
      <dc:creator>MikeL_4</dc:creator>
      <dc:date>2004-10-06T09:33:20Z</dc:date>
    </item>
    <item>
      <title>Re: alias command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/alias-command/m-p/4864191#M862281</link>
      <description>Then what you really want is an alias like this:&lt;BR /&gt;&lt;BR /&gt;alias cmd="ls -al"&lt;BR /&gt;&lt;BR /&gt;then&lt;BR /&gt;&lt;BR /&gt;cmd /usr&lt;BR /&gt;cmd /user&lt;BR /&gt;&lt;BR /&gt;Rgds...Geoff</description>
      <pubDate>Wed, 06 Oct 2004 09:50:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/alias-command/m-p/4864191#M862281</guid>
      <dc:creator>Geoff Wild</dc:creator>
      <dc:date>2004-10-06T09:50:53Z</dc:date>
    </item>
    <item>
      <title>Re: alias command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/alias-command/m-p/4864192#M862282</link>
      <description>I got to know your requirement.&lt;BR /&gt;&lt;BR /&gt; Try as,&lt;BR /&gt;$ alias test='echo "ls -l /user going to be executed"; echo "want to change (Y/N)"; read opt; if [[ $opt = "Y" || $opt = "y" ]]; then echo "Enter directory"; read dir; fi; ls -l $dir'&lt;BR /&gt;&lt;BR /&gt;Execution of test will be as,&lt;BR /&gt;&lt;BR /&gt;$ test&lt;BR /&gt;ls -l /user going to be executed&lt;BR /&gt;want to change (Y/N)&lt;BR /&gt;Y&lt;BR /&gt;Enter directory&lt;BR /&gt;.&lt;BR /&gt;&lt;BR /&gt;It will display all files / directory there. &lt;BR /&gt;alias command can be used as shell script there. &lt;BR /&gt;&lt;BR /&gt;HTH.</description>
      <pubDate>Wed, 06 Oct 2004 10:23:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/alias-command/m-p/4864192#M862282</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2004-10-06T10:23:38Z</dc:date>
    </item>
    <item>
      <title>Re: alias command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/alias-command/m-p/4864193#M862283</link>
      <description>The "whence" command under ksh will display where a command is located or for an alias it will display the alias mapping.&lt;BR /&gt; &lt;BR /&gt;HTH&lt;BR /&gt; &lt;BR /&gt;-- Rod Hills</description>
      <pubDate>Wed, 06 Oct 2004 10:43:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/alias-command/m-p/4864193#M862283</guid>
      <dc:creator>Rodney Hills</dc:creator>
      <dc:date>2004-10-06T10:43:32Z</dc:date>
    </item>
    <item>
      <title>Re: alias command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/alias-command/m-p/4864194#M862284</link>
      <description>To amplify the whence command a bit, use whence -v or the built-in alias: type I have long abandoned which, whereis and alias to figure out what will happen when you type a particular command to the shell. Only type will give you correct information. For example, run which and whereis on these commands:&lt;BR /&gt; &lt;BR /&gt;# which if for stop whence type&lt;BR /&gt;# whereis if for stop whence type&lt;BR /&gt; &lt;BR /&gt;You'll see that if, for and stop are not found at all, and that type is /usr/bin/type. But none of those reports are correct at all. That is not what the shell will do. Now do this:&lt;BR /&gt; &lt;BR /&gt;# type if for stop whence type&lt;BR /&gt;if is a keyword.&lt;BR /&gt;for is a keyword.&lt;BR /&gt;stop is an exported alias for kill -STOP&lt;BR /&gt;whence is a shell builtin.&lt;BR /&gt;type is an exported alias for whence -v&lt;BR /&gt; &lt;BR /&gt;whence and type will tell you what the shell will do. "whereis type" might lead you to believe that /usr/bin/type will be run but that's incorrect. Instead, the shell will run the command whence -v and whence is a shell built-in.&lt;BR /&gt; &lt;BR /&gt;So always use type to see what the shell will do. This is EXTREMELY important if you have the current working directory in $PATH (a very bad idea). If :. or :.: are in your $PATH, someone can put a script called su in some directory and get you to run it by mistake. type will tell where your su will be found by the current shell and environment.</description>
      <pubDate>Wed, 06 Oct 2004 11:24:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/alias-command/m-p/4864194#M862284</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2004-10-06T11:24:35Z</dc:date>
    </item>
    <item>
      <title>Re: alias command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/alias-command/m-p/4864195#M862285</link>
      <description>Thanks</description>
      <pubDate>Wed, 06 Oct 2004 12:28:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/alias-command/m-p/4864195#M862285</guid>
      <dc:creator>MikeL_4</dc:creator>
      <dc:date>2004-10-06T12:28:00Z</dc:date>
    </item>
  </channel>
</rss>

