backup-bash icon indicating copy to clipboard operation
backup-bash copied to clipboard

&>> syntax is not understood until bash v4

Open JayGoldberg opened this issue 10 years ago • 1 comments

I posit that we may be trying to run this on older/embedded platforms which may not have bash 4.x+.

2>&1 >> 1 is equivalent to &>>, it's syntactical sugar.

$ bash --version
GNU bash, version 4.1.2(1)-release (x86_64-redhat-linux-gnu)
...
$ echo hello 2>&1 >> outfile.txt
$ echo hello2 2>&1 >> outfile.txt
$ cat outfile.txt 
hello
hello2
$ echo hello3 &>> outfile.txt
$cat outfile.txt 
hello
hello2
hello3

JayGoldberg avatar Dec 03 '15 01:12 JayGoldberg

Good point, You can submit a PR if you like

LeoJavaAI avatar Dec 03 '15 10:12 LeoJavaAI