Quote:
Originally Posted by
Corona688
Aliases mostly work interactively, not inside scripts.
This is true (by default) with bash, but the OP is using ksh. The latter makes no restrictions with aliases in scripts.
---------- Post updated at 22:09 ---------- Previous update was at 22:03 ----------
Quote:
Originally Posted by
rbalaj16
Need to set the user alias as a gloabal alias to use it in a new ksh shell window.
You cannot anymore export aliases with the current ksh releases. Aliases must be defined either in your shell scripts or in files sourced by your scripts.
One way to do it without modifying existing scripts would be to use the ENV ksh variable and set it to point to a script defining your aliases.
That written, I concur with Corona688 functions are better than aliases and should be used instead.
If you decide to use functions, you can use the FPATH variable to point to a directory where your functions are defined (one file per function).