|
|
|
@ -6,37 +6,37 @@ _bentr(`_link(`POSIX', `https://en.wikipedia.org/wiki/POSIX') (Wikipedia)')
|
|
|
|
|
_bentr(`_link(`POSIX™ 1003.1 Frequently Asked Questions', `https://www.opengroup.org/austin/papers/posix_faq.html')')
|
|
|
|
|
')
|
|
|
|
|
|
|
|
|
|
_header(`as(1)')
|
|
|
|
|
<UL>
|
|
|
|
|
<LI>_link(`as', `https://en.wikipedia.org/wiki/As_(Unix)') (Wikipedia)</LI>
|
|
|
|
|
<LI>_link(`UNIX Assembler Reference Manual', `https://www.tom-yam.or.jp/2238/ref/as.pdf')</LI>
|
|
|
|
|
<LI>_link(`UNIX Operating System Porting Experiences', `https://www.bell-labs.com/usr/dmr/www/otherports/newp.pdf')</LI>
|
|
|
|
|
</UL>
|
|
|
|
|
<H4>GAS</H4>
|
|
|
|
|
<UL>
|
|
|
|
|
<LI>_link(`What I Dislike About GAS', `http://x86asm.net/articles/what-i-dislike-about-gas/')</LI>
|
|
|
|
|
</UL>
|
|
|
|
|
_subheader(`as(1)')
|
|
|
|
|
_bibliography(`
|
|
|
|
|
_bentr(`_link(`as', `https://en.wikipedia.org/wiki/As_(Unix)') (Wikipedia)')
|
|
|
|
|
_bentr(`_link(`UNIX Assembler Reference Manual', `https://www.tom-yam.or.jp/2238/ref/as.pdf')')
|
|
|
|
|
_bentr(`_link(`UNIX Operating System Porting Experiences', `https://www.bell-labs.com/usr/dmr/www/otherports/newp.pdf')')
|
|
|
|
|
')
|
|
|
|
|
_subsubheader(`GAS')
|
|
|
|
|
_bibliography(`
|
|
|
|
|
_bentr(`_link(`What I Dislike About GAS', `http://x86asm.net/articles/what-i-dislike-about-gas/')')
|
|
|
|
|
')
|
|
|
|
|
|
|
|
|
|
_header(`cat(1)')
|
|
|
|
|
<UL>
|
|
|
|
|
<LI>_link(`4.4BSD-Lite2', `https://en.wikipedia.org/wiki/Berkeley_Software_Distribution')/_link(`usr/src/bin/cat/cat.c', `https://github.com/sergev/4.4BSD-Lite2/blob/master/usr/src/bin/cat/cat.c')</LI>
|
|
|
|
|
<LI>_link(`busybox', `https://git.busybox.net/busybox/')/_link(`coreutils/cat.c', `https://git.busybox.net/busybox/tree/coreutils/cat.c')</LI>
|
|
|
|
|
<LI>_link(`cat(1)', `http://man.cat-v.org/unix-1st/1/cat') (UNIX v1)</LI>
|
|
|
|
|
<LI>_link(`cat(1p)', `https://www.unix.com/man-page/posix/1posix/cat/')</LI>
|
|
|
|
|
<LI>_link(`UNIX Style, or cat -v Considered Harmful', `http://harmful.cat-v.org/cat-v/')</LI>
|
|
|
|
|
<LI>_link(`dd(1p)', `https://www.unix.com/man-page/posix/1posix/dd/')</LI>
|
|
|
|
|
<LI>_link(`FreeBSD', `https://www.freebsd.org/')/_link(`bin/cat/cat.c', `https://github.com/freebsd/freebsd-src/blob/main/bin/cat/cat.c')</LI>
|
|
|
|
|
<LI>_link(`GNU coreutils', `https://www.gnu.org/software/coreutils/')/_link(`src/cat.c', `https://git.savannah.gnu.org/cgit/coreutils.git/tree/src/cat.c')</LI>
|
|
|
|
|
<LI>_link(`The history of why cat -v is considered harmful', `https://lyngvaer.no/log/cat-v-history')</LI>
|
|
|
|
|
<LI>_link(`NetBSD', `https://www.netbsd.org/')/_link(`bin/cat/cat.c', `https://github.com/NetBSD/src/blob/trunk/bin/cat/cat.c')</LI>
|
|
|
|
|
<LI>_link(`Plan 9 from Bell Labs Fourth Edition', `https://9p.io/plan9/')/_link(`sys/src/cmd/cat.c', `https://github.com/plan9foundation/plan9/blob/main/sys/src/cmd/cat.c')</LI>
|
|
|
|
|
<LI>_link(`Program Design in the UNIX Environment', `https://harmful.cat-v.org/cat-v/unix_prog_design.pdf')</LI>
|
|
|
|
|
<LI>_link(`A Research Unix Reader', `https://www.cs.dartmouth.edu/~doug/reader.pdf')</LI>
|
|
|
|
|
<LI>_link(`UNIX v7', `https://en.wikipedia.org/wiki/Unix')/_link(`usr/src/cmd/cat.c', `https://www.tuhs.org/cgi-bin/utree.pl?file=V7/usr/src/cmd/cat.c')</LI>
|
|
|
|
|
<LI>Thanks to Miles and WeedSmokingJew for help with content.</LI>
|
|
|
|
|
<LI>Thanks to adamz01h and wiresToGround for help with the JavaScript that used to accompany this article (to facilitate syntax highlighting in code samples using _link(`highlight.js', `https://highlightjs.org/')).</LI>
|
|
|
|
|
<LI>Thanks to Ando_Bando, Miles, u/oh5nxo, and WeedSmokingJew for help with the accompanying code samples.</LI>
|
|
|
|
|
</UL>
|
|
|
|
|
_subheader(`cat(1)')
|
|
|
|
|
_bibliography(`
|
|
|
|
|
_bentr(`_link(`4.4BSD-Lite2', `https://en.wikipedia.org/wiki/Berkeley_Software_Distribution')/_link(`usr/src/bin/cat/cat.c', `https://github.com/sergev/4.4BSD-Lite2/blob/master/usr/src/bin/cat/cat.c')')
|
|
|
|
|
_bentr(`_link(`busybox', `https://git.busybox.net/busybox/')/_link(`coreutils/cat.c', `https://git.busybox.net/busybox/tree/coreutils/cat.c')')
|
|
|
|
|
_bentr(`_link(`cat(1)', `http://man.cat-v.org/unix-1st/1/cat') (UNIX v1)')
|
|
|
|
|
_bentr(`_link(`cat(1p)', `https://www.unix.com/man-page/posix/1posix/cat/')')
|
|
|
|
|
_bentr(`_link(`UNIX Style, or cat -v Considered Harmful', `http://harmful.cat-v.org/cat-v/')')
|
|
|
|
|
_bentr(`_link(`dd(1p)', `https://www.unix.com/man-page/posix/1posix/dd/')')
|
|
|
|
|
_bentr(`_link(`FreeBSD', `https://www.freebsd.org/')/_link(`bin/cat/cat.c', `https://github.com/freebsd/freebsd-src/blob/main/bin/cat/cat.c')')
|
|
|
|
|
_bentr(`_link(`GNU coreutils', `https://www.gnu.org/software/coreutils/')/_link(`src/cat.c', `https://git.savannah.gnu.org/cgit/coreutils.git/tree/src/cat.c')')
|
|
|
|
|
_bentr(`_link(`The history of why cat -v is considered harmful', `https://lyngvaer.no/log/cat-v-history')')
|
|
|
|
|
_bentr(`_link(`NetBSD', `https://www.netbsd.org/')/_link(`bin/cat/cat.c', `https://github.com/NetBSD/src/blob/trunk/bin/cat/cat.c')')
|
|
|
|
|
_bentr(`_link(`Plan 9 from Bell Labs Fourth Edition', `https://9p.io/plan9/')/_link(`sys/src/cmd/cat.c', `https://github.com/plan9foundation/plan9/blob/main/sys/src/cmd/cat.c')')
|
|
|
|
|
_bentr(`_link(`Program Design in the UNIX Environment', `https://harmful.cat-v.org/cat-v/unix_prog_design.pdf')')
|
|
|
|
|
_bentr(`_link(`A Research Unix Reader', `https://www.cs.dartmouth.edu/~doug/reader.pdf')')
|
|
|
|
|
_bentr(`_link(`UNIX v7', `https://en.wikipedia.org/wiki/Unix')/_link(`usr/src/cmd/cat.c', `https://www.tuhs.org/cgi-bin/utree.pl?file=V7/usr/src/cmd/cat.c')')
|
|
|
|
|
_bentr(`Thanks to Miles and WeedSmokingJew for help with content.')
|
|
|
|
|
_bentr(`Thanks to adamz01h and wiresToGround for help with the JavaScript that used to accompany this article (to facilitate syntax highlighting in code samples using _link(`highlight.js', `https://highlightjs.org/')).')
|
|
|
|
|
_bentr(`Thanks to Ando_Bando, Miles, u/oh5nxo, and WeedSmokingJew for help with the accompanying code samples.')
|
|
|
|
|
')
|
|
|
|
|
<P>
|
|
|
|
|
_man(`cat(1)') is a program that exists to catenate files; to "join" one file at its end to another at its start.
|
|
|
|
|
</P>
|
|
|
|
@ -50,7 +50,7 @@ and _code(`-b') to number non-blank lines (both cases for which _man(`nl(1)') wa
|
|
|
|
|
and _code(`-v') to mark invisible characters.
|
|
|
|
|
</P>
|
|
|
|
|
<P>
|
|
|
|
|
Additions to _code(`man(1)') are controversial; Rob Pike and Brian Kernighan explain this in _italic(`Program Design in the UNIX Environment'), the paper that accompanied Rob Pike's presentation _italic(`UNIX Style, or cat -v Considered Harmful') at the 1983 USENIX Summer Conference.
|
|
|
|
|
Additions to _code(`man(1)') are controversial; Rob Pike and Brian Kernighan explain this in _cite(`Program Design in the UNIX Environment'), the paper that accompanied Rob Pike's presentation _cite(`UNIX Style, or cat -v Considered Harmful') at the 1983 USENIX Summer Conference.
|
|
|
|
|
</P>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
|
|
@ -96,13 +96,13 @@ exit 0
|
|
|
|
|
</PRE>
|
|
|
|
|
|
|
|
|
|
_subheader(`echo(1)')
|
|
|
|
|
<UL>
|
|
|
|
|
<LI>_link(`echo', `https://en.wikipedia.org/wiki/Echo_(command)') (Wikipedia)</LI>
|
|
|
|
|
<LI>_link(`echo(1p)', `https://man7.org/linux/man-pages/man1/echo.1p.html') (man7)</LI>
|
|
|
|
|
<LI>_link(`NetBSD', `https://www.netbsd.org/')/_link(`bin/echo/echo.sh', `https://github.com/NetBSD/src/blob/trunk/bin/echo/echo.c')</LI>
|
|
|
|
|
<LI>_link(`UNIX v5', `#UNIX')/_link(`usr/source/s1/echo.c', `https://www.tuhs.org/cgi-bin/utree.pl?file=V5/usr/source/s1/echo.c')</LI>
|
|
|
|
|
<LI>_link(`Variations in echo implementations', `https://www.in-ulm.de/~mascheck/various/echo+printf/')</LI>
|
|
|
|
|
</UL>
|
|
|
|
|
_bibliography(`
|
|
|
|
|
_bentr(`_link(`echo', `https://en.wikipedia.org/wiki/Echo_(command)') (Wikipedia)')
|
|
|
|
|
_bentr(`_link(`echo(1p)', `https://man7.org/linux/man-pages/man1/echo.1p.html') (man7)')
|
|
|
|
|
_bentr(`_link(`NetBSD', `https://www.netbsd.org/')/_link(`bin/echo/echo.sh', `https://github.com/NetBSD/src/blob/trunk/bin/echo/echo.c')')
|
|
|
|
|
_bentr(`_link(`UNIX v5', `#UNIX')/_link(`usr/source/s1/echo.c', `https://www.tuhs.org/cgi-bin/utree.pl?file=V5/usr/source/s1/echo.c')')
|
|
|
|
|
_bentr(`_link(`Variations in echo implementations', `https://www.in-ulm.de/~mascheck/various/echo+printf/')')
|
|
|
|
|
')
|
|
|
|
|
<P>
|
|
|
|
|
Don't use _man(`echo(1)'), use _man(`printf(1)').
|
|
|
|
|
_man(`printf(1)') simulates the _man(`printf(3)') function in the C standard I/O library which has no significant variations, whereas the functionality of _man(`echo(1)') can vary between vendors.
|
|
|
|
@ -149,15 +149,22 @@ while :; do
|
|
|
|
|
done
|
|
|
|
|
</PRE>
|
|
|
|
|
|
|
|
|
|
_subheader(`ed(1)')
|
|
|
|
|
_bibliography(`
|
|
|
|
|
_bentr(`_link(`A Tutorial Introduction to the Unix Text Editor', `https://verticalsysadmin.com/vi/a_tutorial_introduction_to_the_unix_text_editor.pdf')')
|
|
|
|
|
')
|
|
|
|
|
|
|
|
|
|
_subheader(`find(1)')
|
|
|
|
|
<UL>
|
|
|
|
|
<LI><A HREF="https://en.wikipedia.org/wiki/Find_(Unix)">find</A> (Wikipedia)</LI>
|
|
|
|
|
</UL>
|
|
|
|
|
_bibliography(`
|
|
|
|
|
_bentr(`_link(`find', `https://en.wikipedia.org/wiki/Find_(Unix)') (Wikipedia)')
|
|
|
|
|
_bentr(`_link(`"Has this only been added in the last 20 years?"', `https://news.ycombinator.com/item?id=10318841')')
|
|
|
|
|
_bentr(`<A HREF="http://doc.cat-v.org/unix/find-history">The History of the Design of Unix's Find Command</A>')
|
|
|
|
|
')
|
|
|
|
|
|
|
|
|
|
_subheader(`echo(1)')
|
|
|
|
|
<UL>
|
|
|
|
|
<LI><A HREF="https://catonmat.net/ftp/ed.text.editor.cheat.sheet.txt">Ed Cheat Sheet</A></LI>
|
|
|
|
|
</UL>
|
|
|
|
|
_bibliography(`
|
|
|
|
|
_bentr(`<A HREF="https://catonmat.net/ftp/ed.text.editor.cheat.sheet.txt">Ed Cheat Sheet</A>')
|
|
|
|
|
')
|
|
|
|
|
<P>
|
|
|
|
|
A particularly shoddy attempt at _man(`ed(1)') is provided by _code(`busybox').
|
|
|
|
|
A traditional _man(`ed(1)') implementation is in plan9ports.
|
|
|
|
@ -174,22 +181,22 @@ the native Make is simply _command(`make') and the external Make gets a name des
|
|
|
|
|
</P>
|
|
|
|
|
|
|
|
|
|
_subheader(`mkfifo(1)')
|
|
|
|
|
<UL>
|
|
|
|
|
<LI>_link(`mkfifo(1)', `https://man.netbsd.org/mkfifo.1') (NetBSD)</LI>
|
|
|
|
|
<LI>_link(`mkfifo(2)', `https://man.netbsd.org/mkfifo.2') (NetBSD)</LI>
|
|
|
|
|
<LI>_link(`Use mkfifo to create named pipe', `https://dev.to/0xbf/use-mkfifo-to-create-named-pipe-linux-tips-5bbk')</LI>
|
|
|
|
|
<LI>_link(`What is the purpose of using a FIFO vs a temporary file or a pipe?', `https://unix.stackexchange.com/questions/433488/what-is-the-purpose-of-using-a-fifo-vs-a-temporary-file-or-a-pipe')</LI>
|
|
|
|
|
</UL>
|
|
|
|
|
_bibliography(`
|
|
|
|
|
_bentr(`_link(`mkfifo(1)', `https://man.netbsd.org/mkfifo.1') (NetBSD)')
|
|
|
|
|
_bentr(`_link(`mkfifo(2)', `https://man.netbsd.org/mkfifo.2') (NetBSD)')
|
|
|
|
|
_bentr(`_link(`Use mkfifo to create named pipe', `https://dev.to/0xbf/use-mkfifo-to-create-named-pipe-linux-tips-5bbk')')
|
|
|
|
|
_bentr(`_link(`What is the purpose of using a FIFO vs a temporary file or a pipe?', `https://unix.stackexchange.com/questions/433488/what-is-the-purpose-of-using-a-fifo-vs-a-temporary-file-or-a-pipe')')
|
|
|
|
|
')
|
|
|
|
|
|
|
|
|
|
_subheader(`true(1)')
|
|
|
|
|
<UL>
|
|
|
|
|
<LI><A HREF="http://trillian.mit.edu/~jc/;-)/ATT_Copyright_true.html">CHAMBERS John - The /bin/true Command and Copyright</A></LI>
|
|
|
|
|
<LI><A HREF="https://twitter.com/rob_pike/status/966896123548872705">PIKE Rob - "/bin/true used to be an empty file."</A></LI>
|
|
|
|
|
<LI><A HREF="https://www.muppetlabs.com/~breadbox/software/tiny/teensy.html">RAITER Brian - A Whirlwind Tutorial on Creating Really Teensy ELF Executables for Linux</A></LI>
|
|
|
|
|
<LI><A HREF="https://www.unix.com/man-page/posix/1p/true/">true(1p)</A> (The Open Group, 2003)</LI>
|
|
|
|
|
<LI><A HREF="https://www.gnu.org/">GNU</A>/<A HREF="https://www.gnu.org/software/coreutils/">coreutils</A>/<A HREF="https://git.savannah.gnu.org/cgit/coreutils.git/tree/src/true.c">src/true.c</A></LI>
|
|
|
|
|
<LI><A HREF="https://www.netbsd.org/">NetBSD</A>/<A HREF="https://github.com/NetBSD/src/blob/trunk/usr.bin/true/true.sh">usr.bin/true/true.sh</A></LI>
|
|
|
|
|
</UL>
|
|
|
|
|
_bibliography(`
|
|
|
|
|
_bentr(`<A HREF="http://trillian.mit.edu/~jc/;-)/ATT_Copyright_true.html">CHAMBERS John - The /bin/true Command and Copyright</A>')
|
|
|
|
|
_bentr(`<A HREF="https://twitter.com/rob_pike/status/966896123548872705">PIKE Rob - "/bin/true used to be an empty file."</A>')
|
|
|
|
|
_bentr(`<A HREF="https://www.muppetlabs.com/~breadbox/software/tiny/teensy.html">RAITER Brian - A Whirlwind Tutorial on Creating Really Teensy ELF Executables for Linux</A>')
|
|
|
|
|
_bentr(`<A HREF="https://www.unix.com/man-page/posix/1p/true/">true(1p)</A> (The Open Group, 2003)')
|
|
|
|
|
_bentr(`<A HREF="https://www.gnu.org/">GNU</A>/<A HREF="https://www.gnu.org/software/coreutils/">coreutils</A>/<A HREF="https://git.savannah.gnu.org/cgit/coreutils.git/tree/src/true.c">src/true.c</A>')
|
|
|
|
|
_bentr(`<A HREF="https://www.netbsd.org/">NetBSD</A>/<A HREF="https://github.com/NetBSD/src/blob/trunk/usr.bin/true/true.sh">usr.bin/true/true.sh</A>')
|
|
|
|
|
')
|
|
|
|
|
<P>
|
|
|
|
|
_man(`true(1)') is a tool that <I>only</I> quits silently with an exit status of 0.
|
|
|
|
|
Similarly, _man(`false(1)') is a tool that <I>only</I> quits silently with an exit status of 1.
|
|
|
|
@ -233,9 +240,9 @@ The GNU coreutils implementation of _man(`true(1)') is not POSIX compliant.
|
|
|
|
|
</P>
|
|
|
|
|
|
|
|
|
|
_subheader(`vi(1)')
|
|
|
|
|
<UL>
|
|
|
|
|
<LI>_link(`vi(1p)', `https://man7.org/linux/man-pages/man1/vi.1p.html') (man7)</LI>
|
|
|
|
|
</UL>
|
|
|
|
|
_bibliography(`
|
|
|
|
|
_bentr(`_link(`vi(1p)', `https://man7.org/linux/man-pages/man1/vi.1p.html') (man7)')
|
|
|
|
|
')
|
|
|
|
|
<P>
|
|
|
|
|
Unlike _code(`busybox')'s _man(`ed(1)') implementation, its _man(`vi(1)') is very useable.
|
|
|
|
|
_man(`vim(1)') is a popular re-implementation of _man(`vi(1)').
|
|
|
|
|