Shell help needed

Adam Auden adam at bimble.net
Thu Oct 11 11:38:21 BST 2007


On 10/11/07, David Cantrell <david at cantrell.org.uk> wrote:

> I'm ever so embarrassed to have to ask this, but I have a script which
> sshes to another machine, starts a screen(1) on it, does some stuff, and
> then leaves me at a shell prompt.  That stuff is failing because the
> $PATH isn't set correctly:
>
> $ ssh -t some.random.host "screen -S foo /usr/local/bin/bash -c 'echo
>     $PATH;/usr/local/bin/bash'"
>
> $PATH here doesn't contain any of the customisations in my .profile or
> .bashrc.  And no combination of -i or -l when I invoke bash seems to do
> the job.  Help?

screen will start you with a login shell if you specify

shell -$SHELL

in your screenrc file.  If you don't have this specified it defaults
to $SHELL.  screen only gives you a login shell if the command
specified starts with a -.

cheers,

Adam.



-- 
Adam Auden - UNIX Metal Geek
whois bimble.net


More information about the london.pm mailing list