To execute a command in a script
See also: Bash - Script Execution
You can execute an expression inside an input with $(expression). See What is a Subshell in Bash?
echo $(date +"%Y%m%d")
20161027
Bash - Xargs (Standard input command execution) execute commands from standard input.
See also: