how to get output of command in shell script code example
Example: how to print output of a command linux
printf "$dir1 $dir2 $(tail -n -1 pes.log) \n" >> ../opt_done.txt
printf "$dir1 $dir2 $(tail -n -1 pes.log) \n" >> ../opt_done.txt