Path: utzoo!attcan!uunet!unh!pss From: pss@unh.UUCP (Paul S. Sawyer == paul) Newsgroups: comp.bugs.sys5 Subject: bug in cut Keywords: cut null Message-ID: <941@unh.UUCP> Date: 22 Feb 89 19:06:54 GMT Organization: unhtel.UUCP == UNH Telecommunications Lines: 20 I recently noticed some strange behaviour in CUT. After a lot of grief, I discovered that the input file (which had come from a different system via Kermit) had a NULL character after the last newline. This caused an extra blank line to be appended if cut was called using the first character (cut -c1-80 file), and an extra line EXACTLY LIKE THE "REAL" LAST LINE to be appended if the "cut" was from the third character or beyond (cut -c3-80). I RTFM and found, in INTRO(1) "WARNINGS - Some commands produce unexpected results when processing null characters...." Yes, so pass foreign text files thru TR as a minimum if there may be NULLS within! Lots of trouble over "nothing" B-) -- = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Paul S. Sawyer uunet!unh!unhtel!paul paul@unhtel.UUCP UNH Telecommunications Durham, NH 03824-3523 VOX: 603-862-3262 FAX: 603-862-2030