On Fri, Dec 5, 2014 at 5:20 PM, Daniele Nicolodi <dani...@grinta.net> wrote:
> On 05/12/14 16:13, arnaud gaboury wrote: > > Now: > > ---------------------------------- > > $ echo 'lolo=4 lala=5' | tee test > > lolo=4 lala=5 > > $ systemctl --user set-environment 'cat test' > > Failed to set environment: Invalid environment assignments > > ----------------------------------- > > > > No idea what I do wrong. > > This is invalid shell syntax. This should work: > > $ systemctl --user set-environment `cat test` > > or, if you are using bash, I find this more readable: > > $ systemctl --user set-environment $(cat test) > As the variables sometimes have spaces, this might be more reliable: xargs systemctl --user set-environment < test (With -d '\n' or without, depending on chosen syntax.) It's possible to emulate "import-environment" using: xargs -d '\0' systemctl --user set-environment < /proc/self/environ -- Mantas Mikulėnas <graw...@gmail.com>
_______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel