Find the answer to your Linux question:
Results 1 to 2 of 2
Hi, Am working on Redhat Linux. i want to set and get some user defined environment variables.. i know that am supposed to use getenv() and setenv() from c but ...
  1. #1
    Just Joined!
    Join Date
    Sep 2007
    Posts
    2

    environment variable

    Hi,

    Am working on Redhat Linux.
    i want to set and get some user defined environment variables..
    i know that am supposed to use getenv() and setenv() from c but my doubt is about the actions to be done in .bash_profile file regarding the environment variable...
    can anybody guide me in this.

    Thanks,
    Anand

  2. #2
    Linux Enthusiast likwid's Avatar
    Join Date
    Dec 2006
    Location
    MA
    Posts
    649
    you can view the values of a variable by typing

    Code:
    echo $VARNAME
    you can set a variable by typing

    Code:
    export VARNAME=value
    .bash_profile is really a script so you can just add these commands and do whatever.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...