[Help-bash] Is there a way to peek at the stdin buffer in bash?
From:
Peng Yu
Subject:
[Help-bash] Is there a way to peek at the stdin buffer in bash?
Date:
Wed, 9 Nov 2016 08:49:45 -0600
Hi, C has ungetc(). Is there a way to to peek stdin buffer in bash?
(This can be useful if I want to do something depending on the first
initial lines, otherwise I will need to write stdin to file or use
tee, either of which are as efficient as peeking the stdin buffer)
Thanks.
--
Regards,
Peng