C/C++ on Linux/Unix

Moderators: Lundin
Number of threads: 336
Number of posts: 663

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
*** how to set up a variable in Linux? *** Posted by warener on 5 Oct 2007 at 1:17 PM
I am a newbie. I know this is a little off-stream of programming, but it is the problem when I tried to program in linux. I wonder if there is a way to set up a variable, say $VAR = /home/root, so that I can use
cd $VAR
instead of
cd /home/root
Report
Re: *** how to set up a variable in Linux? *** Posted by IDK on 20 Oct 2007 at 1:34 PM
: I am a newbie. I know this is a little off-stream of programming,
: but it is the problem when I tried to program in linux. I wonder if
: there is a way to set up a variable, say $VAR = /home/root, so that
: I can use
: cd $VAR
: instead of
: cd /home/root
:

See man export



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.