Re: script(1) > Why does it output in CR/LF?
- From: James Bailie <jimmy@xxxxxxxxxxxxxxx>
- Date: Tue, 28 Feb 2006 10:05:51 -0500
Glenn Dawson wrote:
> At 02:30 AM 2/28/2006, Kristian Vaaf wrote:
>
>> Hello.
>>
>> I am just curious why the files I generate with script(1) output in CR/LF
>> forcing me to run dos2unix on them everytime?
>
>
> Script just captures the output of your shell, and your shell has to
> send crlf in order to get the cursor back to the beginning of a line.
No it doesn't. The script(1) utility interposes a
pseudo-terminal between the program whose output is to be
captured and itself, so the program thinks its running on a
terminal device and behaves accordingly. Then script(1) acts
like a transparent filter, shuttling data back-and-forth from the
actual terminal to the pseudo-terminal, while sending a copy of
the program's output to the log file as well. It is the terminal
driver in canonical mode, "inside" the pseudo-terminal, that is
expanding NLs in the proggy's output stream into CRNL pairs.
--
James Bailie <jimmy@xxxxxxxxxxxxxxx>
http://www.jamesbailie.com
_______________________________________________
freebsd-questions@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscribe@xxxxxxxxxxx"
- References:
- script(1) > Why does it output in CR/LF?
- From: Kristian Vaaf
- Re: script(1) > Why does it output in CR/LF?
- From: Glenn Dawson
- script(1) > Why does it output in CR/LF?
- Prev by Date: Re: Haven't been able to make world in about a year
- Next by Date: Re: release tag for ports
- Previous by thread: Re: script(1) > Why does it output in CR/LF?
- Next by thread: Snapshots - can we use is for cloning disk(full restore to a new hard disk)
- Index(es):
Relevant Pages
|
|