Comment Comment by 1vuio0pswjnm7 Missing semicolon. FRED=barney; set | grep FRED Also there is no need for grep, nevermind grep -F (fgrep), if using printenv. FRED=barney printenv FRED Without semicolon sh -c 'FRED=barney set|grep FRED' echo 'FRED=barney set|grep ^FRED'|sh parent 1vuio0pswjnm7 3 years ago