Skip to Content.
Sympa Menu

baslinux - [BL] environmental variables

baslinux AT lists.ibiblio.org

Subject: Baslinux mailing list

List archive

Chronological Thread  
  • From: keesan2 AT cyberspace.org
  • To: baslinux AT lists.ibiblio.org
  • Subject: [BL] environmental variables
  • Date: Fri, 5 Dec 2003 20:16:26 -0500

Jim says he was able to use the 'back quotes' with name=`function` to set
an environmental variable equal to $name. But he thanks for you giving
him another way to do this. He is really learning a lot from basiclinux.

He is trying to find more information on dosemu and says less does not
work on HOWTO files. This is probably because we have not installed
howto.tgz. He wants to get his DOS text editor to work under
linux rather than rewrite it in C instead of assembly language.

>jimd wrote:
>>
>> How can standard output be made into an environment varible?
>
>I'm not sure exactly what you are asking. However,
>to take the output of a process and put it into a
>variable, you can use the back-quotes. Like this:
>---------------------
>x=`cat /etc/HOSTNAME`
>echo $x
>---------------------
>
>If your output consists of many words, each word can
>be put into a separate variable like this:
>-------------
>set -- `ls /`
>echo $1
>echo $2
>echo $3
>echo $4
>echo $5
>-------------
>
>Is that the sort of thing you were looking for?
>
>Cheers,
>Steven
> _________________________________________________________________
>
> * Previous message: [11][BL] man2html script
> * Next message: [12][BL] man2html script
> * Messages sorted by: [13][ date ] [14][ thread ] [15][ subject ]
> [16][ author ]
> _________________________________________________________________
>
> [17]More information about the BasLinux mailing list




Archive powered by MHonArc 2.6.24.

Top of Page