SUMMARY: scripting question

From: <dakotak1d_at_netscape.net>
Date: Thu Sep 05 2002 - 17:01:28 EDT
Thanks once again, this list is amazing.....there were several eloquent
ways to do this, these were the 'simple is best' solutions:

esaddler@cccis.com
cat filename | tr -d "\012"

"Jeremy Jin" <jin@gedco.com>
echo `cat yourfile`

"John Elser" <jElser@ck8.uscourts.gov>
cat filename | awk ' {printf }'


"TRUCKS, JESSE (AIT)" <jt9873@sbc.com> provided 2 correct ways:
awk '{printf("%s"),$1}' filename

AND (for ksh):

for USERID in $(cat filename);
   do echo "${USERID}\c";
done

Fabrice Guerini <fabrice@life.net>
perl -ne 's/\s*\n//; print;' filename

Gordon Baldwin <gordon.baldwin@gettyimages.com>,
Joshua Beining <JBeining@eline.com> &
Dan.Burton@trilogy.com 
These gents all provided similiar a simple perl construct:

#! /usr/bin/perl

while(<>) {
   chomp;
   print;
}

Thanks also to:

Rafael Angarita <rangarita@telcel.net.ve>
"Urie, Todd" <TUrie@trueposition.com>
"Bryan J. Smith" <b.j.smith@ieee.org>
"Matthew R. MacIntyre" <matthew.macintyre@ottawa.ca>
"Lee, Elizabeth" <elizabeth.lee.contractor@fnmoc.navy.mil>


Hope I didn't miss anyone.....here was original post:

> Gurus, 
> This ones' a bit off topic, but I'm sure an easy one for some 
> of you sed/awk heads.....I have have these files that have 
> one username per line, i.e.
> 
> user1,
> user2,
> user3,
> 
> How can I get these lines concatenated onto the same line so 
> this file contents would look like:
> 
> user1,user2,user3






__________________________________________________________________
The NEW Netscape 7.0 browser is now available. Upgrade now! http://channels.netscape.com/ns/browsers/download.jsp 

Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
Received on Thu Sep 5 17:02:40 2002

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:42:54 EST