On Sat, Dec 19, 2015 at 01:03:35AM +0100, Piotr Grzybowski wrote: > On Wed, Dec 16, 2015 at 7:36 PM, Stephane Chazelas > <stephane.chaze...@gmail.com> wrote: > > What's wrong with > > > > f=/tmp/myfile; [ -f "$f" ] && { echo "$f is here"; head -n 1 < "$f"; } > > nothing. sometimes it is just not practical (see my answer to Chet's > comment) and sometimes you just want to get that argument given to > test.
If you are trying to advocate for a new feature in bash, it would behoove you to use an example that ACTUALLY DEMONSTRATES how it would be useful. Not a bogus example in which the feature is not only unnecessary, but harmful as well. All of the discussion I've seen so far points to the proposed new feature being useful only in interactive shells, to save a tiny bit of typing when someone is using commands that are quite unusual in interactive mode. In a script, one would store the filename in a variable, every single time.