|
|
|
|
google site
|
|||||||
| Forums | Register | Blog | Man Pages | Forum Rules | Links | Albums | FAQ | Users | Calendar | Search | Today's Posts | Mark Forums Read |
| 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 !! |
![]() |
|
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|||
|
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 | ||
|
|
|
|||
|
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 | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|