print command output in shell script code example
Example 1: print in shell script
#!/bin/bash
DDAY="15-aug-2007"
echo "D-Day is on $DDAY"
echo "Today is $(date)"
echo "Linux version : $(uname -r)"
Example 2: how to print output of a command linux
printf "$dir1 $dir2 $(tail -n -1 pes.log) \n" >> ../opt_done.txt