2015-01-09 17:46 GMT-07:00 abrukhno <[email protected]>: > ...about this: > > log="$(csg_get_property cg.inverse.log_file 2>/dev/null)" > > I've just noticed that the ending "2>/dev/null" is not added to the string > produced but instead dumps the errors of the command in parenthesis (earlier > I was "blind", not seeing these). Yeah, $( ) (and ` `) only fetch stdin, but not stderr. $ x=; x=$(echo yeah); echo x=$x x=yeah $ x=; x=$(echo yeah >&2); echo x=$x yeah x=
In our case csg_get_property prints a couple of extra information, like when a default values is used, to stderr and we don't want the user to see it. Later stderr will just go to the log file, so it won't matter. Christoph > > AB > > -- > You received this message because you are subscribed to the Google Groups > "votca" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/votca. > For more options, visit https://groups.google.com/d/optout. -- Christoph Junghans Web: http://www.compphys.de -- You received this message because you are subscribed to the Google Groups "votca" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/votca. For more options, visit https://groups.google.com/d/optout.
