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

ruby on rails - RuntimeError: Circular dependency detected while autoloading constant - ActiveAdmin.register Role -

c++ - OpenMP unpredictable overhead -

javascript - Wordpress slider, not displayed 100% width -