I only want
echo $(date) to return the date not the backticked version.
echo $(date) # should return Wed Mar 6 09:50:41 EST 2019 echo `date` # should return `date`
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
Wrap the backticks in string quotes to divest them of their subshelly powers:
$ echo '`echo`' `echo`
Beware, though, the contraction wrapped in strong quotes:
$ echo 'I can't process this.' > Oh whoops that ">" means we're still in a strong quote. I cant process this. Oh whoops that ">" means were still in a strong quote.