Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting


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

Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 03-27-2012
Banned
 
Join Date: Nov 2011
Location: IN Chennai-INDIA
Posts: 11
Thanks: 2
Thanked 0 Times in 0 Posts
Text Formating or Modifying

Hi Experts,

I have a text exactly like below in a file:
id item_id
item_date prin_mkt_val
--------------------------- ---------------------------
------------------------------- ------------------------
000448302 0000
May 31 2005 12:00AM 14,085,536

But I want the output as shown below:

id item_id item_date prin_mkt_val
000448302 0000 May 31 2005 12:00AM 14,085,536


Please help me in this using sed or awk or any.
Sponsored Links
    #2  
Old 03-27-2012
guruprasadpr's Avatar
Shrink...ing
 
Join Date: Jun 2009
Location: India
Posts: 674
Thanks: 30
Thanked 215 Times in 214 Posts
Hi


Code:
sed -e 'N;s/\n/ /' -e '/^--/d' file

Guru.
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Text formating issue isaacsam Shell Programming and Scripting 6 01-08-2010 07:18 AM
Text formating jaydeep_sadaria Shell Programming and Scripting 3 11-15-2009 07:48 PM
TEXT formating using script jaydeep_sadaria Shell Programming and Scripting 4 05-18-2009 12:42 AM
Formating text from a script into a log file hugow UNIX for Dummies Questions & Answers 1 06-30-2005 04:01 AM
text formating/Text space padding hugow UNIX for Dummies Questions & Answers 6 06-29-2005 09:49 AM



All times are GMT -4. The time now is 08:48 PM.