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

Bug#655712: ITP: template -- environment variable expander | simple template tool



On Fri, 13 Jan 2012 14:44:13 +0100
Michael Stummvoll <michael@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: pgpkLAWD2lzE4.pgp
Description: PGP signature


Reply to: