|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | 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 | Display Modes |
|
#1
|
|||
|
|||
|
sed problem
Hi Folks,
I want to replace these numbers with words as the following: $echo 1 11 223 I want to replace each number with it name (e.g. "1" replaced with "one", etc.) just to determine how sed works in such case. Thanks in advance .Leo |
| Sponsored Links | ||
|
|
#2
|
||||
|
||||
|
So, you want to replace 223 with "two hundred and twenty three" ???
|
| Sponsored Links | ||
|
|
#3
|
|||
|
|||
|
Hi Balajesuri, Exactly! I just want to know the idea of replacing the number in 'sed' query, what I've been write above is just a very simple example to put my idea on the table. I do appreciate your replay. thanks and still looking for a solution.
|
|
#4
|
||||
|
||||
|
It can be done easily with Perl: Lingua::EN::Numbers - search.cpan.org
|
| Sponsored Links | |
|
|
#5
|
|||
|
|||
|
Thanks Bartus for your valued support, but I'm looking for the solution with sed it self, please consoder what I've done as the following:
example. Quote:
Leo |
| Sponsored Links | |
|
|
#6
|
||||
|
||||
|
Try: Code:
sed -e "s/\<4\>/OFFICIAL_RATE/g" |
| Sponsored Links | |
|
|
#7
|
|||
|
|||
|
Still not working!! I found 4 not OFFICIAL_RATE in the output!!
|
| Sponsored Links | ||
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Problem with forwarding emails (SPF problem) | carwe | IP Networking | 0 | 08-16-2011 06:17 AM |
| DHCP problem and eth1 problem | sllinux | UNIX for Dummies Questions & Answers | 0 | 10-23-2009 02:45 AM |
| Mail Problem. Maybe, it is a DNS Problem! | pintalgi | Red Hat | 1 | 07-19-2009 04:01 PM |
| user login problem & Files listing problem. | pernasivam | AIX | 1 | 06-18-2009 09:09 AM |
| problem in finding a hardware problem | girish.batra | Solaris | 8 | 09-09-2008 10:10 AM |
|
|