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

Re: Cat-ting binary files to the console



On 2001-02-10 10:51 +0100, will trillich <will@serensoft.com> wrote:
> On Thu, Feb 08, 2001 at 11:18:34AM -0600, Benjamin Pharr wrote:
> > Every once in a while I slip up at cat a binary file to the console. (Or 
> > just forget to give mkisofs the -o flag.)  This causes the console to use 
> > WEIRD characters, just plain gibberish.  Is there any way to get rid of 
> > this without rebooting?  Thanks!
> 
> this is a variation on the theme: put control-O into your PROMPT
> string to reset your character set after every command:
> 
> 	# bash
> 	set PS1="^V^O whatever> "
 
Huh? Do you mean "export" instead of "set"? But the exported line
displays verbatim here? (potato)

^V^O whatever>

> 	# csh
> 	setenv prompt="^V^O something> "
> 
> the ^V tells your command shell 'the next character is verbatim,
> don't do whatever you normally would with it' and the ^O is a
> standard 'reset the display character set' for ansi-like terminal
> emulators.
> 
> there's probably a sane modular/universal way of doing this...


Andre Berger                                [andre.berger@topmail.de]



Reply to: