hi, I'm having great difficulty in running this shell script in order to set up the $PATH and $LD_LIBRARY_PATH variables.
Quote:
#!/bin/sh
p1=/usr/src/ns-allinone-2.26/bin
p2=/usr/src/ns-allinone-2.26/otcl-1.0a8
p3=/usr/src/ns-allinone-2.26/lib
p4=/usr/src/ns-allinone-2.26/lib/tcl8.3
p5=/usr/src/ns-allinone-2.26/lib/tk8.3
PATH=$PATH:$p1:$p2:$p3:$p4:$p5
export PATH
$PATH
LD_LIBRARY_PATH=$p3:$p4:$p5
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH
$LD_LIBRARY_PATH
ns $1
|
Its supposed to setup the paths so I can run NS2 Network Simulator but when I try to run it as root (using "su" command) I get the following problems:
Quote:
[root@localhost Downloads]# sh ./run-ns.sh
./run-ns.sh: line 10: export: `/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/usr/local/sbin:/usr/src/ns-allinone-2.26/bin:/usr/src/ns-allinone-2.26/otcl-1.0a8:/usr/src/ns-allinone-2.26/lib:/usr/src/ns-allinone-2.26/lib/tcl8.3': not a valid identifier6/lib/tk8.3
./run-ns.sh: line 12: /sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/usr/local/sbin:/usr/src/ns-allinone-2.26/bin:/usr/src/ns-allinone-2.26/otcl-1.0a8:/usr/src/ns-allinone-2.26/lib:/usr/src/ns-allinone-2.26/lib/tcl8.3:/usr/src: No such file or directory
: command not found3:
: command not found6:
./run-ns.sh: line 17: /usr/src/ns-allinone-2.26/lib:/usr/src/ns-allinone-2.26/li: No such file or directoryne-2.26/lib/tk8.3
: command not found8:
%
|
End result being that no $PATHs have been changed. I'm completely new to this setting of PATH variables and the like so I was hoping someone could help me out
I'm running Mandrake 9.1 with GNOME 2.2
Thanks
Steve