I tried:
who & pwd and it output the result of pwd output: /root.
May I know if I am right?
I tried:
who & pwd and it output the result of pwd output: /root.
May I know if I am right?
The &
operator has nothing to do with executing two commands, see this question.
In order to execute two distinct commands on the same line, use the appropriate separator ;
:
who; pwd