Shell Script Command Substitution Approach 1 Syntax variable-name=$(command expression) Example k=$(date) NOTE Approach 2 Syntax variable-name=`command expression` Example k=`date` I. EXAMPLE OF LISTING FILES AND SUB FOLDERS OF CURRENT DIRECTORY VIA COMMAND…