KANERAI interview question

What does the command `echo $(ls)` do?

Interview Answer

Anonymous

Aug 12, 2024

The command uses command-substitution to echo the output of the `ls` command. Let’s ignore for the moment that it is relatively pointless since just `ls` would have the same effect without `echo`.