How can I haz output from command line application in shell variable? I'm writing a shell script that needs to know a users uid number. So I've tried UID=id -u $NAME and what I think might be every possible combination of grouping symbols, and none of them work. What the hell? The output is a SINGLE NUMBER. It should not be this hard to store it
(
Read more... )
Comments 1
bash-3.2$ $F
bash: 50135: command not found
bash-3.2$ echo $F
50135
bash-3.2$ G="id -u $NAME"
bash-3.2$ $G
50135
Reply
Leave a comment