Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #16798

Re: How do we intercept file saving or output to stdout directly

Path csiph.com!goblin2!goblin1!goblin.stu.neva.ru!usenet.stanford.edu!not-for-mail
From Robert Elz <kre@munnari.OZ.AU>
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 <mailman.939.1598254240.2469.bug-bash@gnu.org> (permalink)
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 <budikusasi@gmail.com>
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 <bug-bash.gnu.org>
List-Unsubscribe <https://lists.gnu.org/mailman/options/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive <https://lists.gnu.org/archive/html/bug-bash>
List-Post <mailto:bug-bash@gnu.org>
List-Help <mailto:bug-bash-request@gnu.org?subject=help>
List-Subscribe <https://lists.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=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

Show key headers only | View raw


    Date:        Sun, 23 Aug 2020 23:17:32 -0700 (MST)
    From:        almahdi <budikusasi@gmail.com>
    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

Back to gnu.bash.bug | Previous | Next | Find similar


Thread

Re: How do we intercept file saving or output to stdout directly Robert Elz <kre@munnari.OZ.AU> - 2020-08-24 14:30 +0700

csiph-web