1

I have this:

npm install "$tgz_path"  &>> "$HOME/.r2g/logs/r2g.log";

but that is syntactically incorrect. How do I append stdout+stderr to that log file?

1 Answer 1

2

That syntax is valid in bash. From man bash:

The format for appending standard output and standard error is:

&>>word

A more basic way to write it (that works in more shells) will be:

$ npm install "$tgz_path" >>word 2>&1 "$HOME/.r2g/logs/r2g.log";
1
  • yeah maybe bash3 can't do the first one, I get a syntax error with bash3 Commented May 8, 2018 at 3:33

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.