Programatically write in a file in the environnent with a hush command

Alexander Richter Alexander.Richter at ATSonline.de
Tue May 26 23:24:17 PDT 2015


> Am 27.05.2015 um 08:10 schrieb Alexander Richter <alexander.richter at atsonline.de>:
> 
> Hello,
>> Am 26.05.2015 um 17:42 schrieb Jean-Christophe BEGUE <begue.jc at gmail.com>:
>> 
>> Hello,
>> 
>> I'm trying to pass a value from Barebox to the operating system, using
>> the usreland command bareboxenv -l.
>> 
>> My problem is : How should I write that status from my hush barebox script?
>> 
>> echo $mystatus > /env/data/my_status_file
> You can use the command nv to create non volatile shell variables. Don’t forget to save the Environment.
Additionally, a echo -a / -o might be useful in your case.
-a <file>",  "instead of outputting to stdout append to <file>
-o <file>",  "instead of outputting to stdout overwrite <file>
>> 
>> The above command doesn't work as '>' is not implemented.
>> 
>> I've the feeling that I'm missing something?
>> 
> To access the new variable (/env/nv/foo.bar) from userspace, you can use the „bareboxenv“ tool
> 
> Alexander Richter
> _______________________________________________
> barebox mailing list
> barebox at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox



More information about the barebox mailing list