Path: csiph.com!goblin2!goblin1!goblin.stu.neva.ru!usenet.stanford.edu!not-for-mail From: Robert Elz Newsgroups: gnu.bash.bug Subject: Re: How do we intercept file saving or output to stdout directly Date: Mon, 24 Aug 2020 14:30:18 +0700 Lines: 29 Approved: bug-bash@gnu.org Message-ID: References: <1598249852364-0.post@n7.nabble.com> <12939.1598254218@jinx.noi.kre.to> NNTP-Posting-Host: lists.gnu.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: usenet.stanford.edu 1598254241 18459 209.51.188.17 (24 Aug 2020 07:30:41 GMT) X-Complaints-To: action@cs.stanford.edu Cc: Bug-bash@gnu.org To: almahdi Envelope-to: Bug-bash@gnu.org In-Reply-To: <1598249852364-0.post@n7.nabble.com> Received-SPF: permerror client-ip=2001:3c8:9009:181::2; envelope-from=kre@munnari.OZ.AU; helo=munnari.OZ.AU X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, KHOP_HELO_FCRDNS=0.4, T_SPF_HELO_PERMERROR=0.01, T_SPF_PERMERROR=0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: bug-bash@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Bug reports for the GNU Bourne Again SHell List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: <12939.1598254218@jinx.noi.kre.to> X-Mailman-Original-References: <1598249852364-0.post@n7.nabble.com> Xref: csiph.com gnu.bash.bug:16798 Date: Sun, 23 Aug 2020 23:17:32 -0700 (MST) From: almahdi Message-ID: <1598249852364-0.post@n7.nabble.com> | How do we intercept and redirect file saving or output to stdout directly in | bash, just like e.g | | xkbcomp $DISPLAY I think you're just experiencing an oddity with xkbcomp and if you want to report an issue, it is with the X11 project that you should be talking, this one has nothing to do with bash. The problem is that xkbcomp (for whatever reason) wants to unlink the file it is going to write to before creating a new one, and, kind of obviously, no matter what magic name you give, you cannot unlink stdout. You can however do (or at least, on my system, I can do) xkbcomp -o - $DISPLAY and that seems to work (it is often worth testing whether "-" works for stdin/stdout when all else has failed - programs sometimes special case that name). kre