w*s 发帖数: 7227 | 1 if i type "echo $VAR" in the bash shell, it displays abc.
but in my script,
#!/bin/bash
echo $VAR;
echo $PATH;
it outputs this without "abc", why ?
administrator@ubuntu:~/dummy$ ./t0.sh
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games | x****s 发帖数: 921 | 2 need "export VAR" in your current env |
|