On Fri, Nov 02, 2001 at 10:50:39AM +0530, H.S.Rai wrote: > I get following type of output of " script " output , when viewed from > saved file "typescript" > > _______________ > > [1mNAME[0;10m > ls - list directory contents > > [1mSYNOPSIS[0;10m > [1mls[0;10m [[4mOPTION[24m]... [[4mFILE[24m]... > > [1mDESCRIPTION[0;10m > List information about the FILEs (the current directory by > _________________ > > How to take readble output similar to seen on screen. > > H S Rai > > --__--__-- ---end quoted text---
The problems with 'script' output are two: a) It outputs ANSI screen codes (since that is printed to screen) b) Sends a ^M (ASCII 13) after every line (like a DOS file). To read a script output file, the easiest way is to do a cat. All colours will show up, as you originally saw it. The ANSI escape codes normally need to be manually removed at times if you want to push output to printer or over e-mail. I do not know of any utility removing ANSI sequence. To remove the ^M use any of the methods (like tr, recode or pico). HTH Bish -- : ####[ Linux One Stanza Tip (LOST) ]########################### Sub : DOS to Unix conversion (#3) LOST #137 DOS text files with ^M can be cleared by pico editor. Load the dos text file in pico, Do a small edit job on it. (e.g. place a space and delete it again) .. Save .. Quit. All ^Ms gone !! ####<[EMAIL PROTECTED]>#################################### : _______________________________________________ linux-india-help mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/linux-india-help
