On Tue, Mar 26, 2024 at 08:39:18AM +0000, Shinichiro Kawasaki wrote: > On Mar 25, 2024 / 19:27, Daniel Wagner wrote: > (echo "foo" > file) 2>/dev/null > > {echo "foo" > file} 2>/dev/null > > > > I suppose we want to keep it simple and just add the brackets around the echos. > > Both has pros and cons: added brackets are simpler, while file existence check > is more readable, IMO. I think either way is fine. I see, so let's go with the existence check, I also find it simpler to read (understand).