in reply to Gathering current ksh shell aliases in perl
However, this with create a non-login shell. What happens now depends on the versions of ksh you are using, and where your aliases are defined. Let me assume your aliases are in .kshrc. If so, then on ksh88 then ~/.kshrc (or the file defined in the ENV environment variable) will be executed and you should be fine. However on ksh93 it will not execute $ENV, so you need:use warnings; use strict; my @aliases = qx(ksh -c alias); print "@aliases\n";
or 'source' whatever file your aliases are defined in.my @aliases = qx(ksh -c '. ~/.kshrc;alias');
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Gathering current ksh shell aliases in perl
by afoken (Chancellor) on Apr 28, 2010 at 06:26 UTC |