shell - > /dev/null 2>&1 still has output in stdout -


i try following:

#!/bin/bash  var=$(< temp.temp) > /dev/null 2>&1  echo $var 

i expected no outputs whether temp.temp exists or not. when tried these command, still has outputs. on this? thanks.

use this:

{ var=$(<temp.temp); } 2>/dev/null 

Comments

Popular posts from this blog

Prolog - Listing -

orchardcms - change base url in local copy in Orchard CMS -

linear regression - Trying to get confidence/prediction intervals with `predict.lm` in R, but I keep getting an error regarding my dichotomous variable -