From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: References: Date: Tue, 7 Sep 2010 23:05:54 +0200 Message-ID: From: Rudolf Sykora To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [9fans] how to print a program Topicbox-Message-UUID: 5248ac52-ead6-11e9-9d60-3106f5b1d025 also, a nice feature of 'fmt' is that long lines are broken AND indented according to the start of the just-being-processed line; this is welcome... R On 7 September 2010 23:00, Rudolf Sykora wrote: > Hello, > > I want to 'print' the 'page' program, i.e. put /sys/src/cmd/page/* on paper. > I want different files start on new pages, with the header of every > page being the file name and the page. > For this the command > a=`{ls} pr $a | lp -dstdout > toprint.ps > is almost ok. > That 'almost' is in the fact that long lines get truncated, which is > highly undesirable. > fmt -j > could help, but it also replaces spaces and tabs by a single space, again bad. > (btw. why > fmt <>afile > doesn't work?) > > So how? > Can anybody help? (I mean, is there a one-liner?) > Thank you! > Ruda >