> -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:
>
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.
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
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
> > 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`
where perlscript puts out a l
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
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
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
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
> > 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
On Fri, 17 Oct 2003 10:21:59 -0700, "LoBue, Mark" <[EMAIL PROTECTED]> wrote:
> > -Original Message-
> > From: Harter, Douglas [mailto:[EMAIL PROTECTED]
> > Sent: Friday, October 17, 2003 8:09 AM
> > To: Beginners Mailing List Perl (E-mail)
> -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?
>
> I have a command I want to u
12 matches
Mail list logo