guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: system default shell


From: Maciej Stachowiak
Subject: Re: system default shell
Date: Thu, 11 Oct 2001 14:40:49 -0700
User-agent: Mutt/1.2.5i

On 11Oct2001 04:49PM (-0400), Dale P. Smith wrote:
> Maciej Stachowiak wrote:
> > 
> > On 11Oct2001 01:15PM (+0200), David Pirotte wrote:
> > > how can i ask
> > >
> > >       (system <...>)
> > >
> > > to use the default user shell (instead of 'sh)
> > >
> > > for example (system "beep") works in bash
> > >
> > 
> > You'll have to lookup the user's shell and call it inside your system
> > command. `system'is meant to give consistent results regardless of the
> > user's shell.
> > 
> > (system "bash -c 'beep'") would be an example of how to force use of
> > bash, but if you really want to get the user's shell you will have to
> > use getpwent and the like.
> 
> Don't most (if not all) shells have a $SHELL variable? Or is that yet
> another bashism?
> 

That's likely to give you the shell the script was run from, which may
or may not be the same as the user's shell.

 - Maciej




reply via email to

[Prev in Thread] Current Thread [Next in Thread]