From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <102653644221696.tru64-unix-managers.marc@archive.invalid> From: Lisa.Morris () victorreinz ! com Date: Thu, 13 Dec 2001 14:03:18 +0000 To: tru64-unix-managers Subject: SUMMARY: ASCII File in UNIX X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=102653644221696 Question was: I have a user who has an Ascii file in UNIX. He would like to convert this file - or be able to open it and actually look at it (without all of the symbols in it). Is there some way to do this in UNIX??? Thanks, Lisa Morris I received a lot of responses and all of them were extremely helpful - I learned a lot of commands that I did not know were there.... Thanks for all your responses. **************************************** # od -a file.name That "symbols" will display with thier ascii equivalent. You can use -b and -o instead of -a if you want to look at the numeric character representations. ****************************************** If you can type a "file [filename]" in your system and then you get a response like "ASCII text" then you will be able to do a "vi [filename]" to see the ASCII text file just as it was typed before. Then if you woule like to take this strange caracters off from your file, you can make a copy of this file like this "cp [originalfile][copiedfilename]". Then "vi [copiedfilename]". Then, being inside "vi editor" you can do the following procedure to take thouse caracters off (replacing them): 1. Press "shift :" 2. At the the bottom, close to the ":" sign, type "%s/[yourstrangecharacter//g" then press "Enter" 3. You will see that thouse "notwanted" characters disappear. **************************************************** Another possibility is to use the Unix 'file' command to see what kind of file Unix thinks it is. This looks at the first few bytes for 'magic characters' that some software puts at the beginning of a file which indicate the type. ****************************************************** od -c -b filename > filename_od.txt (ascii and octal dump) or od -c -h filename > filename_od.txt (ascii and hex dump)