create a variable in the .bashrc file in my home directory
I need to create a varaible ($DOC) in the .bashrc file in my home directory (/home/machinename/)as a shortcut to the files in /usr/share/doc
The variable should be called DOC I am using Red Hat 3.0 workstation I thought I had the correct command. I used vi editor on .bashrc I inserted the command path=$path:/usr/share/doc/ |
You need to export variable if they are to be used by processes other than the shell itself. Also, note that variable names are case sensitive - path is not the same as PATH.
For example: Code:
myvar="something" You can do it all in one go like this: Code:
export myvar="something" |
You could also create a symlink to /usr/share/doc:
For example: ln -s /usr/share/doc ~/sysdocs |
All times are GMT -5. The time now is 08:35 AM. |