Hello,
Thank you for all of you for the help.
We run aix (unix)
1- I tried the chdir: not working
2- I tried alias in .profile put I would like to do: “setsite siteX && cd siteX”
My solution:
1- I added in the .profile the following code (to tell ksh to source my new file-function)
. $FPATH/setsitecd
2- I creaetd a file in $HCIROOT/kshlib ($FPATH): setsitecd
3- I add the following code (function):
function setsitecd {
eval `${CL_INSTALL_DIR}/integrator/sbin/hcisetenv -site ksh $*`
# modif yg pour faire un cd vers $HCSITEDIR
# verif si hcisetenv ok
if [ $? -eq 0 ] ; then
for param in $@ ;
do
# verif si rep existe
if [ -d $HCIROOT/$param ] ; then
print “cd $HCIROOT/$param: O=Oui – N=Non > c”
read reponse
case $reponse in
O | o )
cd $HCIROOT/$param
;;
esac
fi
done
fi
}
4- I did some tests and it works as expected.
Thank you
Yves
😀