Hi, I have a question about bash.
and I'm new to this.
I created a file called "test.sh" and its contents
#!/bin/bash
set -x
echo $UID
echo "$UID"
echo "$(id -u)"
and the result is empty! nothing is displayed
However, when I just type "echo $ UID" on the terminal it shows "1011"
is there anything i missed for bash?
Please, help
UPDATED
bash version 4.3.11, and I typed "sh test.sh" to execute.
and result
+ echo
+ echo
+ id -u
+ echo 1011
1011
thank!
source
share