stdout - Display output of a Bash command and keeping the output in a variable -


i'm not sure if possible want run bash command , storing output in variable , display if launched command normally. here code:

var=`svn checkout $url` 

so want store output in var , still see result (and because svn checkout takes long time, can't echo $var after..)

thanks

if command run terminal, can do:

var=$(svn checkout $url | tee /dev/tty) 

Comments

Popular posts from this blog

ruby - When to use an ORM (Sequel, Datamapper, AR, etc.) vs. pure SQL for querying -

php - PHPDoc: @return void necessary? -

c++ - Convert big endian to little endian when reading from a binary file -