I have just found out that even if I use "1>inverse.log 2>/dev/null" the errors are still end up in csg_errors.log that I provide for csg_inverse.sh script. So not much is missing.
Andrey On Mon, Jan 12, 2015 at 4:03 PM, Christoph Junghans <[email protected]> wrote: > 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 a topic in the > Google Groups "votca" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/votca/OTEEUvhUavU/unsubscribe. > To unsubscribe from this group and all its topics, 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. > -- 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.
