On Fri, 13 Jan 2012 14:44:13 +0100
Michael Stummvoll <mich...@stummi.org> wrote:

> On 13.01.2012 14:35, Neil Williams wrote:
> > printenv? Maybe printenv combined with sed or grep ... What is the 
> > advantage? 
> expanding variables in a file is very tricky using bash only.

? file? You're talking about environment variables.

> And I don't really see your point. What did you mean with "printenv 
> combined with sed"? Listing all environment-variables and replacing them 
> in the stream using sed?

$ printenv|grep GDM_LANG|sed -e 's/GDM_LANG=//'

#!/bin/sh
GLANG=`printenv|grep GDM_LANG|sed -e 's/GDM_LANG=//'`
echo $GLANG

Why is that hard?

-- 


Neil Williams
=============
http://www.linux.codehelp.co.uk/

Attachment: pgpNhSt5aY3dm.pgp
Description: PGP signature

Reply via email to