The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
retrieved multiple lines on multiple places in a file dala Shell Programming and Scripting 8 03-14-2008 03:28 PM
remove specific lines from flat file using perl meghana Shell Programming and Scripting 12 02-12-2008 09:50 PM
How to read lines from a flat file bihani4u Shell Programming and Scripting 2 09-28-2006 01:54 PM
Use sed to merge multiple lines xb88 Shell Programming and Scripting 3 08-08-2006 01:54 PM
Sorting a flat file based on multiple colums(using character position) cucubird Shell Programming and Scripting 8 07-25-2006 12:47 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 12-05-2006
hnhegde hnhegde is offline
Registered User
  
 

Join Date: Aug 2006
Posts: 22
merge multiple lines from flat file

Hi,

I have a tab delimited flat file like this:
Code:
189     Guide de lutilisateur sur lappel conférence à trois au moyen d'adaptateurs téléphoniques        <TABLE><TBODY><TR><TD><DIV class=subheader>La fonction Appel conférence à trois </DIV></TD>
\
<TD><?php print $navTree["features"]["3_way_calling"]["name"];?> vous permet de tenir un appel conférence simultanément avec deux autres parties. </TD></TR>
\
<TR>
\
<TD height=10></TD></TR>
\
<TR>
\
How do I merge all these lines into one single line? I searched through the forum, but did not find anything helpful.

TIA,
  #2 (permalink)  
Old 12-05-2006
vgersh99's Avatar
vgersh99 vgersh99 is online now Forum Staff  
Moderator
  
 

Join Date: Feb 2005
Location: Boston, MA
Posts: 5,122
what lines do you want to 'concatinate'?
ALL the lines?
Lines with a single '\' appearing on a traling line?
Something else?
  #3 (permalink)  
Old 12-05-2006
hnhegde hnhegde is offline
Registered User
  
 

Join Date: Aug 2006
Posts: 22
Hi vgersh,

Thanks for the reply. I was looking to join everything into one line, irrespective of whether there is a '\' or not.

TIA,
  #4 (permalink)  
Old 12-05-2006
vgersh99's Avatar
vgersh99 vgersh99 is online now Forum Staff  
Moderator
  
 

Join Date: Feb 2005
Location: Boston, MA
Posts: 5,122
Quote:
Originally Posted by hnhegde
Hi vgersh,

Thanks for the reply. I was looking to join everything into one line, irrespective of whether there is a '\' or not.

TIA,
Code:
tr -d '\n' < myFile
  #5 (permalink)  
Old 12-05-2006
hnhegde hnhegde is offline
Registered User
  
 

Join Date: Aug 2006
Posts: 22
Thanks a lot for the command vgersh!!
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 10:51 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0