Command substitution in Linux Shell Scripting

Command substitution in Linux Shell Scripting can be done in 2 ways.

  1. x=`ls`
  2. x=$(ls)

In command substitution, output of the command is assigned to the variable.

You may also like...