RE: alias in the shell

2003-10-21 Thread LoBue, Mark
> -Original Message- > From: Steve Grazzini [mailto:[EMAIL PROTECTED] > Sent: Tuesday, October 21, 2003 11:43 AM > To: LoBue, Mark > Cc: [EMAIL PROTECTED] > Subject: Re: alias in the shell > > > On Tue, Oct 21, 2003 at 11:35:15AM -0700, LoBue, Mark wrote: >

Re: alias in the shell

2003-10-21 Thread Steve Grazzini
On Tue, Oct 21, 2003 at 11:35:15AM -0700, LoBue, Mark wrote: > Someone is missing the point, I'm not sure who yet. I'll admit to going on a tangent... :-) The original topic was how to create a shell alias from Perl. > No, that won't work, because the alias command is running in a forked child.

RE: alias in the shell

2003-10-21 Thread LoBue, Mark
Someone is missing the point, I'm not sure who yet. > -Original Message- > From: Steve Grazzini [mailto:[EMAIL PROTECTED] > Sent: Friday, October 17, 2003 10:10 PM > To: Smoot Carl-Mitchell > Cc: [EMAIL PROTECTED] > Subject: Re: alias in the shell > > &g

Re: alias in the shell

2003-10-18 Thread Smoot Carl-Mitchell
On Sat, 18 Oct 2003 01:10:08 -0400 Steve Grazzini <[EMAIL PROTECTED]> wrote: > > system("ENVVAR=whatever; export ENVVAR; command"); > > You don't need the export. You do if it you want to make ENVVAR exportable to the children of the forked shell. Otherwise it is a normal shell variable. > $FO

Re: alias in the shell

2003-10-18 Thread Hacksaw
> > Is it possible to create an alias in the shell from within Perl? > > > > I have a command I want to use in the shell after my Perl > > script executes. This command can vary, so what I would > > prefer to do is set up an alias to execute it. eval `perlscript

Re: alias in the shell

2003-10-17 Thread Steve Grazzini
On Fri, Oct 17, 2003 at 04:05:10PM -0700, Smoot Carl-Mitchell wrote: > Steve Grazzini <[EMAIL PROTECTED]> wrote: > > > Have you actually tried ". perlscript" ? :-) > > This will not work. Yes, anyone who tries it will realize this immediately. :-) > system("ENVVAR=whatever; export ENVVAR; comm

Re: alias in the shell

2003-10-17 Thread Smoot Carl-Mitchell
On Fri, 17 Oct 2003 14:32:07 -0400 Steve Grazzini <[EMAIL PROTECTED]> wrote: > > Have you actually tried ". perlscript" ? :-) > This will not work. The shell "." command for the Bourne and Korn shell effectively sources the file and expects it to contain shell commands. You can fork a shell

RE: alias in the shell

2003-10-17 Thread Wiggins d'Anconia
On Fri, 17 Oct 2003 11:43:51 -0700, "LoBue, Mark" <[EMAIL PROTECTED]> wrote: > > > There is no way I know of for a child process to modify the > > environment of > > > it's parent. You might try having your perl program create a script > > > some

Re: alias in the shell

2003-10-17 Thread Steve Grazzini
On Fri, Oct 17, 2003 at 11:43:51AM -0700, LoBue, Mark wrote: >>> You can also get tricky by running your perl script in the current >>> environment using: >>> . program_name (space after the dot) >>> then your program could exit using exec('path/to/shell'); >> >> I am not sure I understood the OP

RE: alias in the shell

2003-10-17 Thread LoBue, Mark
> > There is no way I know of for a child process to modify the > environment of > > it's parent. You might try having your perl program create a script > > somewhere in the path, then the parent could execute it. > > > > You can also get tricky by running your perl script in the current > > env

RE: alias in the shell

2003-10-17 Thread Wiggins d'Anconia
To: Beginners Mailing List Perl (E-mail) > > Subject: alias in the shell > > > > > > Is it possible to create an alias in the shell from within Perl? > > > > I have a command I want to use in the shell after my Perl > > script executes. This co

RE: alias in the shell

2003-10-17 Thread LoBue, Mark
> -Original Message- > From: Harter, Douglas [mailto:[EMAIL PROTECTED] > Sent: Friday, October 17, 2003 8:09 AM > To: Beginners Mailing List Perl (E-mail) > Subject: alias in the shell > > > Is it possible to create an alias in the shell from within Perl? > &

alias in the shell

2003-10-17 Thread Harter, Douglas
Is it possible to create an alias in the shell from within Perl? I have a command I want to use in the shell after my Perl script executes. This command can vary, so what I would prefer to do is set up an alias to execute it. I realize aliases are created differently in different shells. I