|
FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below. |
|
Thread Tools | Display Modes |
|
|||
add to path
Hello, i need to add to system path to but so far have been unable to do this, have tried
Code:
set path = (/hsphere/shared/java/diablo-jdk1.6.0/bin/java) bash: syntax error near unexpected token `(' many thanks |
|
|||
many thanks
|
|
||||
bare parens in sh-style languages generally mean run it in a subshell, or an error.
old idiomatic way: $ tar cf - . | (cd /somewhere; tar xf -) is roughly a shortcut for: $ tar cf - . | sh -c "cd /somewhere; tar xf -" the only time you should be seeing ( or ) in setting a path variable, is if you want to do something like $ PATH="$(pwd)/bin:$PATH"; export PATH .
__________________
My Journal Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''. |
|
||||
Quote:
Code:
# csh # echo $PATH /sbin:/usr/sbin:/bin:/usr/bin ... # shorten for brevity # set PATH = $PATH /usr/local set: Variable name must begin with a letter. # set PATH = ($PATH /usr/local) # echo $PATH /sbin:/usr/sbin:/bin:/usr/bin ... /usr/local #
__________________
The best way to learn UNIX is to play with it, and the harder you play, the more you learn. If you play hard enough, you'll break something for sure, and having to fix a badly broken system is arguably the fastest way of all to learn. -Michael Lucas, AbsoluteBSD |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Need to use full path to commands and xorg.config problem | phreud | FreeBSD General | 4 | 17th November 2008 07:44 PM |