help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to read from terminal in a script when the stdin is taken from a


From: Alex fxmbsw7 Ratchev
Subject: Re: How to read from terminal in a script when the stdin is taken from a file?
Date: Sun, 18 Apr 2021 00:56:56 +0200

</dev/tty

On Sun, Apr 18, 2021, 00:43 Peng Yu <pengyu.ut@gmail.com> wrote:

> Suppose a script is called with stdin from a file.
>
> ./script.sh < file
>
> Within the script, I want to read from the terminal in which the
> script is called. A plain read command will not work, could anybody
> let me know what is the correct way to call `read` so that it will
> read from the terminal?
>
> Thanks.
>
> --
> Regards,
> Peng
>
>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]