Path: utzoo!attcan!uunet!mcvax!diku!dkuug!ambush!kimcm From: kimcm@ambush.UUCP (Kim Chr. Madsen) Newsgroups: comp.unix.wizards Subject: Re^2: Kernel Hacks & Weird Filenames Message-ID: <757@ambush.UUCP> Date: 13 May 88 09:29:05 GMT References: <13041@brl-adm.ARPA> <14020039@hpisod2.HP.COM> <326@augean.OZ> <56@lazlo.UUCP> Organization: AmbraSoft A/S (Denmark) Lines: 100 In article <56@lazlo.UUCP> ccs@lazlo.UUCP (Clifford C. Skolnick) writes: >This solution will also handle any control strings for the terminal. I >wonder what "vi" would look like on his terminal :-). Many things >would break if you put the stuff in the kernel tty driver, let's leave >it in the "ls" or "cat" command. By the way, isn't there a Berkleyish >type command "see" which does expand these things? I seem to remember >"ls | see" from somewhere, maybe it was Xenix. The program see is found under Xenix and as far as I remember also on BSD Systems, in System V it's an option to cat "cat -v" (v for visible) will display all control characters as ^ as in ^C, and all characters with 8'th bit set as M- as M-a (Meta-a). If you're missing such feature on your particular system here is a PD version of see, it has some restrictions however it strips 8'th bit of every byte (easy to fix) and prints ~ for non-printable characters. It was written for some Xenix III system which didn't have the see command and look like another Xenix systems see command. Regards, Kim Chr. Madsen, AmbraSoft A/S, Rojelskaer 15, DK-2840 Holte (Denmark) UUCP: kimcm@ambush.dk, PHONE: +45 2424 111, FAX: +45 2423 090 Your old men shall dream dreams, your young men shall see visions. -- The Bible, Joel, II:28 ----------------------------CUT HERE-------------------------------- /* * see - a program to view files containing non-printable characters. * * SYNOPSIS * see [ file | - ] ... * * FORMAT OF OUTPUT * See prints non-printable characters in the following order: * 000 - 040 : As the corresponding control characters, * preceeded by a caret '~'. Except the following * LINEFEED : Printed as a newline. * TAB : Printed as a TAB character. * * PROGRAMMED BY * Kim Chr. Madsen * Wed Mar 12 12:30:19 DNT 1986 */ #include main(argc,argv) int argc; char *argv[]; { int i; FILE *f; extern FILE *fopen(); extern void visual(); if (argc<2) { visual(stdin); exit(0); } for (i=1; i