From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Smith, Mike R." Newsgroups: gmane.os.tru64.managers Subject: Summary: Control characters in shell file Date: Wed, 29 Jan 2003 08:57:20 -0500 Sender: tru64-unix-managers-owner@ornl.gov Message-ID: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: main.gmane.org 1043848616 4082 80.91.224.249 (29 Jan 2003 13:56:56 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 29 Jan 2003 13:56:56 +0000 (UTC) Return-path: Original-Received: from sws1.ctd.ornl.gov ([160.91.22.101]) by main.gmane.org with smtp (Exim 3.35 #1 (Debian)) id 18dshH-00011S-00 for ; Wed, 29 Jan 2003 14:56:12 +0100 Original-Received: (qmail 12459 invoked by uid 5); 29 Jan 2003 13:57:48 -0000 Original-Followup-To: poster Precedence: bulk Original-Received: (qmail 12434 invoked by uid 49493); 29 Jan 2003 13:57:48 -0000 Original-Received: from smithmr@bowater.com by sws1 by uid 49491 with qmail-scanner-1.14 (clamscan: 0.54. spamassassin: 2.50-cvs. Clear:SA:0(-2.9/5.0):. Processed in 0.372033 secs); 29 Jan 2003 13:57:48 -0000 Original-Received: from unknown (HELO emroute2.cind.ornl.gov) (128.219.159.41) by 0 with SMTP; 29 Jan 2003 13:57:47 -0000 Original-Received: from emroute2.cind.ornl.gov (LOCALHOST [127.0.0.1]) by emroute2.cind.ornl.gov (PMDF V6.1-1 #30669) with ESMTP id <0H9H007VCAS93R@emroute2.cind.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Wed, 29 Jan 2003 08:57:47 -0500 (EST) Original-Received: from gvls010.bowater.com ([167.147.30.1]) by emroute2.cind.ornl.gov (PMDF V6.1-1 #30669) with SMTP id <0H9H00HAXAS1BE@emroute2.cind.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Wed, 29 Jan 2003 08:57:38 -0500 (EST) Original-Received: from unknown(167.147.240.34) by gvls010.bowater.com via csmap id 13310; Wed, 29 Jan 2003 08:55:28 -0500 (EST) Original-Received: from gvlsnt78.bowater.com ([167.147.30.102]) by GVLAFW01; Wed, 29 Jan 2003 08:57:35 -0500 (EST) Original-To: "Tru64 \(E-mail\)" X-MIMEOLE: Produced By Microsoft Exchange V6.0.6249.0 Thread-Topic: Summary: Control characters in shell file Thread-Index: AcLHnlMBQxJtT1/zRAK2T//WG3dF6w== content-class: urn:content-classes:message X-MS-Has-Attach: X-MS-TNEF-Correlator: Xref: main.gmane.org gmane.os.tru64.managers:3123 X-Report-Spam: http://spam.gmane.org/gmane.os.tru64.managers:3123 Thanks to the many of you who responded. Since you took the time to = respond, I will take the time to list you. =20 Somehow Emacs is acting like a windows based environment and is putting = carriage returns in the files. Several solutions were presented, which are quite simple. I used the = one at the tool but I see that many of the others should work too. It = just depends on whether you want to fix it from inside the file or = outside the file. :%s%$%% (use vi to get rid of them) The MTOLLS subset has a dos2unix prog that will remove them tr -d '\015' < dosfile > unixfile <- simplification, but it'll do cat file_name | col -b > new_file_name strings originalfile > newfile sed -e 's/^M//g' > The ^M characters are the end of line markers put in by DOS/Windows. The easiest way to get rid of them is to use emacs replace. To get the ^M, = you need to use CTRL-Q - CTRL-M and replace with null. Thanks to Chris Bryant, Thomas Sjolshagen, Galen Johnson, Dr. Thomas = Blinn, Charles Ballowe, Brajesh Kumar, Phillip Brown, Blehl Blake, = Premjit Nair, Jesper Frank Nemholt, Keith Texel, Joerg Bruehe, Matthew = Wild, Mark Deiss, Harm Enging.