backup-bash
backup-bash copied to clipboard
&>> syntax is not understood until bash v4
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
Good point, You can submit a PR if you like