in reply to Gathering current ksh shell aliases in perl

Hi

I'm not sure what the aliases of the current ksh shell exactly means...

...here two pragmatic solutions:

a) if you wanna process the saved aliases of your .aliases do it like cdarke showed, since alias is a builtin of various shells and not an isolated unix command.

b) if you need to process the interactively created aliases from the running ksh, why don't you simply bind a new alias to call your script with the aliases piped in?

this works for me in bash:

lanx@nc10-ubuntu:~$ alias plalias='alias |perl -pe "s/alias//;print $. +"' lanx@nc10-ubuntu:~$ plalias 1 egrep='egrep --color=auto' ... 11 ls='ls --color=auto' 12 plalias='alias |perl -pe "s/alias//;print $."'

of course you have to process a new alias called plalias now... :)

HTH!

Cheers Rolf