Current-Users archive

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

Re: script(1) bug?



On Fri, Aug 28, 2026 at 10:25:26 +0200, Martin Husemann wrote:

> > for i in $(jot 100); do
> >     : > typescript
> >     script -qc echo > /dev/null
> >     [ ! -s typescript ] && echo ERROR
> > done | uniq -c
> 
> I couldn't reproduce it, but reading the script man page I wouldn't have
> expected -c echo to work at all (run "echo" instead of the shell - doesn't
> make sense to me as echo only exists as a builtin; I guess what it really
> does is invoke "${SHELL} -c ..." instead of plain "${SHELL}").

Yes, it calls system(3) (but /bin/echo _is_ a thing).

-uwe


Home | Main Index | Thread Index | Old Index