I have two different script 1st one is
sar -u -s 11:00:00 -e 11:10:59 | grep Average: | awk '{printf($8)}'
2nd one will show the time which is 60 min old
date -d '60 minute ago' "+%H:%M:%S"
I want to use 2nd sctipt in 1st script (without creating any .sh file) Below code is not working
sar -u -s `date -d '60 minute ago' "%H:%M:%S"` -e 11:10:59 | grep Average: | awk '{printf($8)}'
argument must be a format string beginning with '+'. Give it a try.+sign. BTW, using$(....)instead of backquotes is more idiomatic for doing command substitution.