|
From: | davidpbrown |
Subject: | bug#30919: [grep: input file './x’ is also the output] too late!.. have a null file. |
Date: | Fri, 23 Mar 2018 19:35:26 +0000 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 |
Hi, Surprised that the error is noted but only after the file gets clobbered. Example: ===================== echo "blah" > ./x grep -v 'foo' ./x > ./x # grep: input file './x’ is also the output # results with x being empty. ===================== Would have expected that catch to be caught ahead of writing a null in place of the original file. bash -v suggests RELEASE: 2.1 this on Linux Mint. Regards davidpbrown
[Prev in Thread] | Current Thread | [Next in Thread] |