您还应该在报价中加入$@ ,以确保正确地重新引用扩展。 setenv is a csh command, not a sh command. The equivalent in bash is export: #!/bin/sh export LD_LIBRARY_PATH=/opt/lsf/9.1/linux2.6-glibc2.3-x86_64/lib:/abc/software/new_2015/GE/tcl_tk/lib64:/abc/software/new_2015/GE/tcl_tk/...
setenv does not exist in sh, and csh is extremely rarely used in scripts and has been surpassed by bash for interactive use for the last 20 years (and zsh for even longer), so you can forget about it unless you encounter it. The env command is very rarely useful except...
The options for unset in ksh are:–f Where name refers to a function name, the shell unsets the function definition. –n If name refers to variable that is a reference, the variable name is unset rather than the variable it references. Otherwise, this option is equivalent to the –v ...
Sets the environment variable PATH. PATH listsseparated by colons (""), which are the default paths to search forexecutablefiles when a command is called. After you set PATH to the above value, the shell looks in the paths/bin,/usr/bin,/usr/sbin, and/usr/local/bin, in that order, ...