Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: read with redirected stdin



On Sat, Jan 7, 2023 at 6:37 PM Pier Paolo Grassi <pierpaolog@xxxxxxxxx> wrote:
>
> I am still wondering,  what can be a way to simulate the situation of a script launched by cron, where there is no tty and no other mean for read to connect to a terminal?

This should do it:

    at now <<\END
    echo hello from $0 >/tmp/log
    END

Roman.




Messages sorted by: Reverse Date, Date, Thread, Author