single environment variable

This is a discussion on single environment variable within the Linux Programming forums, part of the Platform Specific Boards category; What is a single environment variable? I'm having trouble defining it. And how do you disply it?...

  1. #1
    Registered User
    Join Date
    Sep 2003
    Posts
    49

    single environment variable

    What is a single environment variable? I'm having trouble defining it. And how do you disply it?
    Code this

  2. #2
    twm
    twm is offline
    root
    Join Date
    Sep 2003
    Posts
    232
    >What is a single environment variable?
    Just a simple environment variable.

    >I'm having trouble defining it.
    Depends on your shell, here are two common ones

    bash:
    Code:
    $ export OOGA="This is a simple environment variable"
    $ echo $OOGA
    This is a simple environment variable
    tcsh:
    Code:
    % setenv OOGA "This is a simple environment variable"
    % echo $OOGA
    This is a simple environment variable
    Pretty much any other common shell will be a derivative of one of those two. Check your friendly neighborhood man pages to see how to do it with your shell.

    >And how do you disply it?
    What do you know, I answered two questions with one answer. Look above to see a way to echo a shell variable.
    The information given in this message is known to work on FreeBSD 4.8 STABLE.
    *The above statement is false if I was too lazy to test it.*
    Please take note that I am not a technical writer, nor do I care to become one.
    If someone finds a mistake, gleaming error or typo, do me a favor...bite me.
    Don't assume that I'm ever entirely serious or entirely joking.

  3. #3
    Registered User
    Join Date
    Sep 2003
    Posts
    49
    What do you know, I answered two questions with one answer. Look above to see a way to echo a shell variable.

    lol, thanks!
    Code this

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. sorting number
    By Leslie in forum C Programming
    Replies: 8
    Last Post: 05-20-2009, 05:23 AM
  2. How accurate is the following...
    By emeyer in forum C Programming
    Replies: 22
    Last Post: 12-07-2005, 12:07 PM
  3. Static global variable acting as global variable?
    By Visu in forum C Programming
    Replies: 2
    Last Post: 07-20-2004, 09:46 AM
  4. Use of variable
    By alice in forum C Programming
    Replies: 8
    Last Post: 06-05-2004, 08:32 AM
  5. Replies: 2
    Last Post: 04-12-2004, 02:37 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21