LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   bash - return home path (http://www.linuxquestions.org/questions/programming-9/bash-return-home-path-646263/)

babag 06-01-2008 05:34 PM

bash - return home path
 
using:
Code:

string homepath = getenv("HOME");

cout << homepath << endl;

to return '/home/user_acct' in c++.
how do i do the same in bash?

thanks,
BabaG

Guttorm 06-01-2008 05:52 PM

echo $HOME

babag 06-01-2008 05:59 PM

well, that's certainly simple.

thanks!
BabaG


All times are GMT -5. The time now is 06:21 AM.