in reply to Re^11: Unix Aliases?
in thread Unix Aliases?
If it's not something obviously stupid that I'm doing I think I'll just use the boring 3 hash tables idea. Thanks for all your help, Ronnie#!/usr/bin/perl -w # use lib "/home/interface/scripts/Perl_Modules" ; # sub getenv { my $profile = shift; my @envlines = (`exec ksh -c ". $profile; ISWTEACH; env"`); open OPF, ">myxxrcdata" or die "\n\tBugger: $!\n" ; foreach (@envlines) { chomp; next unless /=/; print "$_\n" ; # No alias lines appear print OPF "$_\n" or die "\n\tIt's nae use captin: $!\n" ; my ($var, $value) = split(/=/, $_, 2); $ENV{$var} = $value; } # close OPF or die "\n\tShit... I mean oh Dear!\n" ; # return 1 ; # } # END - getenv # #################################### # Variables # #################################### # $file = '/home/rcruickshank/Perl/xxrc_inter_prof.pl' ; # #################################### # Processing # #################################### # print "\n\t<***** SOR *****>\n" ; # getenv("$file") or die "\n\tIt didnae run min! : $!\n" ; # print "\n\tOracle SID :: $ENV{ORACLE_SID}\n" ; # print "\n\t<***** EOR *****>\n" ;
|
|---|