Re: [PATCH] t5563: prevent "ambiguous redirect"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Johannes Schindelin via GitGitGadget" <gitgitgadget@xxxxxxxxx>
writes:

> (in fact, the `printf ''>$CHALLENGE` is removed because the next line
> overwrites the file anyway because it _also_ uses a single `>` to
> redirect the output).

Good eyes. I also wondered what that empty printf was doing.  While
I suspect the original intention was to start from an empty file and
keep appending contents with any meaning so that the redirection on
subsequent lines would look identical, I do not think it is
necessary in this case, primarily because it is unlikely that any
future change will swap the first line with any subsequent lines.

Thanks for spotting.  I was hoping that we could soon retire the
"quote the redirection target if it has parameter substitution to
help older bash" rule in our coding guidelines, but this example
shows that the world is not quite ready yet.




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux