[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: environment variables
From: |
David T. Pierson |
Subject: |
Re: environment variables |
Date: |
Sat, 07 Dec 2013 00:23:46 -0500 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Thu, Dec 05, 2013 at 10:08:36PM +0100, Nico Schlömer wrote:
> I get
>
> $ screen
> --> screen
> $ echo $FOO
> bar
>
> but a detached shell yields nothing:
>
> $ screen -s /bin/bash -L -d -m echo $FOO
> $
There are a couple of things to say here.
The lack of output has nothing to do with the environment variable. The
echo command is running within the new screen session, to which you are
not attaching (and which will exit after echo exits.) So nothing should
appear as output in the current shell. Try:
$ screen -d -m echo foo
to see the same thing (nothing) in your current shell.
However, since you used -L to enable logging, you should see the output
in the log.
Finally, note that $FOO gets expanded by the current shell before screen
is invoked. If you want different behavior, please be more specific
about what you are really trying to accomplish.
David