Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google site



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

Reply
English Japanese Spanish French German Portuguese Italian Powered by Powered by Google
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 11-05-2009
Registered User
 

Join Date: Nov 2009
Posts: 1
SED question

I am trying to write a script that will take an input text file in the format

person: place: phonenumber;
person: place: phonenumber;
person: place: phonenumber;
...

and output it using sed too:

Name ######## Location ######### Phone Number
-------------------------------------------------------
person ####### place ########## (xxx) xxx-xxxx

without the pound signs.

I'm having a hard time understanding how SED reads the colon, and how to create headers to place the info under.

Any help is much appreciated.

Last edited by jmack56; 11-05-2009 at 09:06 PM.. Reason: Smiley faces
Sponsored Links
  #2 (permalink)  
Old 11-09-2009
Registered User
 

Join Date: Mar 2009
Posts: 144
I am not quite sure what exactly you want. Check if this helps


Code:
 cat abc.txt
person: place: phonenumber;
xyz: place1: 1111111111;


Code:
echo "Name ######## Location ######### Phone Number";  sed -e s/:/########/g abc.txt

Name ######## Location ######### Phone Number
person######## place######## phonenumber;
xyz######## place1######## 1111111111;

HTH,
PL
Sponsored Links
Reply

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 Off




All times are GMT -4. The time now is 07:08 AM.


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-2010. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0