Subject: Re: add less in /rescue
To: mouss <>
From: Andrew Brown <>
List: tech-userlevel
Date: 07/08/2004 00:29:16
On Thu, Jul 08, 2004 at 02:04:57AM +0200, mouss wrote:
>Greg A. Woods wrote:
>> "Ed" is in fact a very fine and _very_ useful utility, as ascetic as it
>> may be.  I think learning to use "ed" well can still teach most people
>> more about Unix than any other single utility could ever do.  Except
>> maybe sh.  :-)
>I think you're exagerating a bit. ed isn't only an obscure program, it's 
>also an obsolete piece of code (right around the corner, I have a 
>supermarket called "Ed". it's like its unix friend, low quality low 
>price, which is ok, but that's only good for those who don't want or 
>can't afford better). The only thing I can say about ed is "remove it 
>from the tree" (or should I sing "Ed B good tonight?")
>> Howerver there is still 'sh'!  :-)
>> 	i=1
>> 	dmesg | while read line ; do
>> 		echo $line
>> 		if [ $((i++ % 24) -eq 0 ]; then
>> 			read ret < /dev/tty
>> 		fi
>> 	done
>> It doesn't handle counting of wrapped lines of course, but it's better
>> than trying to use <CTRL-S>!  :-)
>ahem. Is the game an "obfuscated more context" or what? If more is too 
>much (which would imply that less is yet much more), then a solution is 
>to get a dumber prog that doesn't know about all term things but can 
>print N lines step by step, and this can be done with not much more 
>lines than the prev sh code in safe and fast compiled C. even the number 
>of lines ands columns can be passed as args.

ed /kern/msgbuf
(rinse, lather, repeat)

|-----< "CODE WARRIOR" >-----|             * "ah!  i see you have the internet (Andrew Brown)                that goes *ping*!"       * "information is power -- share the wealth."