alias question

Can someone tell me out to set global aliases in QNX 4.25?

I tried putting them in /etc/systinit.1 - doesn’t work.
I tried putting them in a /.profile file - only works on login console,
but not in photon

Normally I put my aliases in a .bashrc, .cshrc, etc. Does sh have such
a configuration file? Any ideas how I can set these?

Secondary question: I have this alias on tcsh:
alias cd 'cd !; echo $cwd’
Any idea what the equivalent of !
is in sh?

Thanks,
Edith Hand

Aliases normally go in a .kshrc file (or the equivalent for whatever shell
you’re using).

To have the ksh execute your .kshrc put “export ENV=$HOME/.kshrc” in your
…profile.

To make “global” aliases what we do on our systems is have a /.kshrc and
~/.mykshrc for custom aliases i.e. “export ENV=/.kshrc” is in everyone’s
…profile. At the end of /.kshrc is:
if [ “$HOME” = “/” ]; then
FILE=.mykshrc
else
FILE=/.mykshrc
fi
if [ -f $HOME$FILE ]; then
. $HOME$FILE
fi

For #2, $* (maybe)

-Rob

“Edith Hand” <edith.e.hand@noaa.gov> wrote in message
news:3C85162F.70343FDF@noaa.gov

Can someone tell me out to set global aliases in QNX 4.25?

I tried putting them in /etc/systinit.1 - doesn’t work.
I tried putting them in a /.profile file - only works on login console,
but not in photon

Normally I put my aliases in a .bashrc, .cshrc, etc. Does sh have such
a configuration file? Any ideas how I can set these?

Secondary question: I have this alias on tcsh:
alias cd 'cd !; echo $cwd’
Any idea what the equivalent of !
is in sh?

Thanks,
Edith Hand

There is also a global /etc/profile but I not sure if Photon will pick up
alias defined therein. When you say Photon do you mean pterm? If so try
adjusting pterm so that it is always launched with the -l option. This will
ensure the shell profiles get executed.

“Edith Hand” <edith.e.hand@noaa.gov> wrote in message
news:3C85162F.70343FDF@noaa.gov

Can someone tell me out to set global aliases in QNX 4.25?

I tried putting them in /etc/systinit.1 - doesn’t work.
I tried putting them in a /.profile file - only works on login console,
but not in photon

Normally I put my aliases in a .bashrc, .cshrc, etc. Does sh have such
a configuration file? Any ideas how I can set these?

Secondary question: I have this alias on tcsh:
alias cd 'cd !; echo $cwd’
Any idea what the equivalent of !
is in sh?

Thanks,
Edith Hand