how to install a command I just made (compiled) on IRIX 6.5 - SGI

This is a discussion on how to install a command I just made (compiled) on IRIX 6.5 - SGI ; Hi, this is a newbie question, it might even be common for many unix'es and it is so selfevident that it is not documented in such a way that I can find it. I have just compiled xtrs (the TRS-80 ...

+ Reply to Thread
Results 1 to 10 of 10

Thread: how to install a command I just made (compiled) on IRIX 6.5

  1. how to install a command I just made (compiled) on IRIX 6.5

    Hi, this is a newbie question, it might even be common for many unix'es
    and it is so selfevident that it is not documented in such a way that I
    can find it.

    I have just compiled xtrs (the TRS-80 emulator) and get an xtrs files of
    type generic command. I can execute it by clicking it in a direcory
    view. But it needs a parameter
    xtrs -romfile m1.rom
    (this specifies the rom file for the model I)
    so I go to the console and to this directory and types the command but
    now it insists xtrs - Command not found
    I then create a reference which sits itself on / and now I can run from
    console
    /xtrs -romfile m1.rom

    So;
    How can I get IRIX to recognize xtrs as a general command?
    How can I get xtrs to have this parameter every time without typing it in?

    I have seen there are command scripts could I create one of those? how?

    Knut
    Knut

    --
    Knut
    (delete 'nogarbage.' for email)

  2. Re: how to install a command I just made (compiled) on IRIX 6.5

    In article ,
    Knut Roll-Lund wrote:
    .....
    >So;
    >How can I get IRIX to recognize xtrs as a general command?
    >How can I get xtrs to have this parameter every time without typing it in?


    Examine the PATH environment variable.
    For example, "echo $PATH" will show what this is.
    This shows, separated by colons, the locations (directories) that are
    searched by the shell when a command is typed. You can
    1. Put the command in one of these directories.
    2. Put the command somewhere else and add the lcoation to PATH
    3. Put a link from one of these directories that points to you command
    4. Put an alias in the shell startup that points to the full path of the command.

    You can combine this a bit to have the right parameters by putting
    the command in a directory already defined in PATH (eg, /usr/local/bin)
    and then define an alias as "alias xtrs="/usr/local/bin/xtrs -foo -bar"


  3. Re: how to install a command I just made (compiled) on IRIX 6.5

    Knut Roll-Lund wrote:
    > How can I get IRIX to recognize xtrs as a general command?
    > How can I get xtrs to have this parameter every time without typing it in?


    welcome to UNIX land ... commands are found when they reside
    either in directories contained in your standard PATH (type printenv)
    (thatīs like it was back in MSDOS where you probably came from)
    but the shell does _not_ look in the adjacent directory.

    You must enforce that by use of the local designator "./"
    "./xtrs" means: go execute the "xtrs" command from where I now am
    (here aka the working directory, type "pwd").

    Walther

  4. Re: how to install a command I just made (compiled) on IRIX 6.5

    Hi Walther

    and also thanks to and also Daniel
    > Knut Roll-Lund wrote:
    >> How can I get IRIX to recognize xtrs as a general command?
    >> How can I get xtrs to have this parameter every time without typing it
    >> in?

    >
    >
    > welcome to UNIX land ... commands are found when they reside
    > either in directories contained in your standard PATH (type printenv)
    > (thatīs like it was back in MSDOS where you probably came from)
    > but the shell does _not_ look in the adjacent directory.
    >
    > You must enforce that by use of the local designator "./"
    > "./xtrs" means: go execute the "xtrs" command from where I now am
    > (here aka the working directory, type "pwd").


    Yes I found that out, the path, and actually it didn't recognize the
    command was there until I rebooted, reinitiated the user.... so now I
    can specify the command line without directory but have to specify the
    parameter file spec fully.

    Odd that current directory isn't automatically in the path (like it is
    on MS-DOS). I wasn't, before this, aware that PATH was a unix construct
    and that it was an environment variable actually very similar to MS-DOS
    or for that sake WinXP. I had already found out about the environment
    variables when I tried to get the correct TIMEZONE setup for here.

    I wonder if IRIX cashes the commands and this is why it had to be
    rebooted before it could be found through the path.

    Anyway, I tried fiddling with alias but couldn't get it to set anything
    new. But alias seems to be the right choice for default parameters. I
    haven't yet found out where the initial alias setting is done. There is
    only the ls enhancement there from before.

    I'm logged in as root when I deal with this.

    --
    Knut
    (delete 'nogarbage.' for email)

  5. Re: how to install a command I just made (compiled) on IRIX 6.5

    Knut Roll-Lund schrieb:
    > Hi Walther
    >
    > and also thanks to and also Daniel
    >> Knut Roll-Lund wrote:
    >>> How can I get IRIX to recognize xtrs as a general command?
    >>> How can I get xtrs to have this parameter every time without typing
    >>> it in?

    >>
    >>
    >> welcome to UNIX land ... commands are found when they reside
    >> either in directories contained in your standard PATH (type printenv)
    >> (thatīs like it was back in MSDOS where you probably came from)
    >> but the shell does _not_ look in the adjacent directory.
    >>
    >> You must enforce that by use of the local designator "./"
    >> "./xtrs" means: go execute the "xtrs" command from where I now am
    >> (here aka the working directory, type "pwd").

    >
    > Yes I found that out, the path, and actually it didn't recognize the
    > command was there until I rebooted, reinitiated the user.... so now I
    > can specify the command line without directory but have to specify the
    > parameter file spec fully.
    >
    > Odd that current directory isn't automatically in the path (like it is
    > on MS-DOS).


    Think about security. Whats happend if a bad guy placed a shell script
    in your directory called 'ls' and the script contains something like this:

    #!/bin/sh

    rm -rf /*



    Do you think it would be wise that this script was executed when you
    type in the 'ls' command?

    > I wasn't, before this, aware that PATH was a unix construct
    > and that it was an environment variable actually very similar to MS-DOS
    > or for that sake WinXP. I had already found out about the environment
    > variables when I tried to get the correct TIMEZONE setup for here.
    >
    > I wonder if IRIX cashes the commands and this is why it had to be
    > rebooted before it could be found through the path.


    Thats what the 'history' is good for.

    >
    > Anyway, I tried fiddling with alias but couldn't get it to set anything
    > new. But alias seems to be the right choice for default parameters. I
    > haven't yet found out where the initial alias setting is done. There is
    > only the ls enhancement there from before.
    >
    > I'm logged in as root when I deal with this.


    As the others already told you can specify and modifing the users SHELL
    environment by placing ne definitions in the .profile, .cshrc or what
    ever you use as your current shell.

    Take also a look into /etc/default/login.

    regards
    Joerg


  6. Re: how to install a command I just made (compiled) on IRIX 6.5


    Knut Roll-Lund wrote:

    > Yes I found that out, the path, and actually it didn't recognize the
    > command was there until I rebooted, reinitiated the user....


    For future reference, the reboot isn't necessary. Just use the "rehash"
    command if you are running csh or tcsh as your shell, or "hash -r"
    elsewhere.


  7. Re: how to install a command I just made (compiled) on IRIX 6.5

    Joerg Behrens wrote:

    > As the others already told you can specify and modifing the users SHELL
    > environment by placing ne definitions in the .profile, .cshrc or what
    > ever you use as your current shell.
    >
    > Take also a look into /etc/default/login.


    ....but note that the PATH values in /etc/default/login have been
    deprectaed and do not actually propagate to the shell's $PATH in IRIX
    6.5...


  8. Re: how to install a command I just made (compiled) on IRIX 6.5

    josehill wrote:
    > Knut Roll-Lund wrote:
    >
    >
    >>Yes I found that out, the path, and actually it didn't recognize the
    >>command was there until I rebooted, reinitiated the user....

    >
    >
    > For future reference, the reboot isn't necessary. Just use the "rehash"
    > command if you are running csh or tcsh as your shell, or "hash -r"
    > elsewhere.
    >

    OK, thanks, I see.

    I actually found out the alias command, it doesn't like the equal sign
    even if the "man alias" claims there has to be equal sign... so:
    alias xtrs "xtrs -romfile /usr/xtrs/m1.rom"
    does the trick
    alias xtrs="xtrs...
    just ignores the command (written exactly like the "man" says)

    Maybe there is a mismatch between the "man" and the actual alias command.

    --
    Knut
    (delete 'nogarbage.' for email)

  9. Re: how to install a command I just made (compiled) on IRIX 6.5

    Knut Roll-Lund schrieb:
    > josehill wrote:

    [...]
    >
    > I actually found out the alias command, it doesn't like the equal sign
    > even if the "man alias" claims there has to be equal sign... so:
    > alias xtrs "xtrs -romfile /usr/xtrs/m1.rom"
    > does the trick
    > alias xtrs="xtrs...
    > just ignores the command (written exactly like the "man" says)
    >
    > Maybe there is a mismatch between the "man" and the actual alias command.
    >

    'alias' is a shell builtin command: 'man csh' (or 'man tcsh'), then
    search for 'alias'. Same thing for sh, ksh, bash, ... But: C-Shells use
    a different syntax compared to Bourne-Shells (as you have already noted).

    --
    Albrecht Jacobs

  10. Re: how to install a command I just made (compiled) on IRIX 6.5

    Knut Roll-Lund wrote:
    > I actually found out the alias command, it doesn't like the equal sign
    > even if the "man alias" claims there has to be equal sign... so:
    > alias xtrs "xtrs -romfile /usr/xtrs/m1.rom"
    > does the trick
    > alias xtrs="xtrs...
    > just ignores the command (written exactly like the "man" says)
    >
    > Maybe there is a mismatch between the "man" and the actual alias command.
    >


    Go write a shell script! No voodo with this... itīs easy!

    You may *want* to have a look at some excellent IRIX tutorial
    which Ian Mapleson has written for IRIX newbies on his web site,
    http://www.futuretech.blinkenlights.nl/admin/

    Thanks a lot, Ian!

    Btw., tcsh (my favourite) provides history _and_ file name completion.
    Issue "tcsh" from your shell and hit tab with an incomplete file name...
    once you found out about it you wonīt want to miss it.

    Walther

+ Reply to Thread