The UNIX and Linux Forums  


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



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 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 4 Weeks Ago
jmack56 jmack56 is offline
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; 4 Weeks Ago at 09:06 PM.. Reason: Smiley faces
  #2 (permalink)  
Old 3 Weeks Ago
daptal daptal is offline
Registered User
  
 

Join Date: Mar 2009
Posts: 68
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
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 On




All times are GMT -4. The time now is 08:09 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-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0