Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mulitiple lines on one line and : delimited 1

Status
Not open for further replies.
Apr 13, 2004
316
US
How do I print these lines so it is a single line with each path delimited by a colon :))?

/usr/j2se/jre/lib/sparc/libawt.so
/usr/j2se/jre/lib/sparcv9/libawt.so
/usr/java1.2/jre/lib/sparc/libawt.so
/usr/openv/java/jre/lib/sparc/libawt.so
/mnt/SunVTS_5.1_PS5/.install/JRE/jre/lib/sparc/libawt.so
/mnt/smc/disk1/JDK1.4.2_03/Solaris/SUNWj3rt/reloc/j2se/jre/lib/sparc/libawt.so
/mnt/sol9/supp/WBEM_DR_1.0/.install/JRE/jre/lib/sparc/libawt.so
/mnt/sol9/supp/SunForum_3.2/.install/JRE/jre/lib/sparc/libawt.so
/mnt/sol9/supp/Sun_Fire_B10n_Load_Balancing_Blade_1.1/.install/JRE/jre/lib/sparc/libawt.so
/mnt/sol9/supp/SunATM_5.1/.install/JRE/jre/lib/sparc/libawt.so
/mnt/sol9/supp/RSC_2.2.2/.install/JRE/jre/lib/sparc/libawt.so
/mnt/sol9/supp/OpenGL_1.3/.install/JRE/jre/lib/sparc/libawt.so
/mnt/sol9/supp/Capacity_on_Demand_1.0/.install/JRE/jre/lib/sparc/libawt.so
/mnt/sol9/supp/System_Service_Processor_3.5/.install/JRE/jre/lib/sparc/libawt.so
/mnt/sol9/supp/SunVTS_5.1_PS5/.install/JRE/jre/lib/sparc/libawt.so

For example (using 4 lines of those above) I want:
/usr/j2se/jre/lib/sparc/libawt.so:/usr/j2se/jre/lib/sparcv9/libawt.so:/usr/java1.2/jre/lib/sparc/libawt.so

Thanks.
 
Something like this ?
tr '\012' ':' </path/to/input >output

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top