Hi,
how to convert & into AND.
Can anyone please suggest me how to achieve this.
Thanks iun advance
how to convert & into AND
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
Code: Select all
sed -e 's/\&/AND/g' yourFileName
-
- Participant
- Posts: 86
- Joined: Wed Mar 03, 2010 3:09 am
THanks for your reply.Sainath.Srinivasan wrote:...Code: Select all
sed -e 's/\&/AND/g' yourFileName
but here i am working on windows.So please suggest me.
-
- Premium Member
- Posts: 1735
- Joined: Thu Mar 01, 2007 5:44 am
- Location: Troy, MI
-
- Participant
- Posts: 86
- Joined: Wed Mar 03, 2010 3:09 am
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Presumably this is an isolated ampersand, one with space either side of it. Or will you have strings like Abbott&Costello - and, in that case, what is your rule for dealing with it?
Check out the parallel version of Ereplace() (search DSXchange for it). It does exactly what you require. But note that you may need to replace " & " with " AND ".
Check out the parallel version of Ereplace() (search DSXchange for it). It does exactly what you require. But note that you may need to replace " & " with " AND ".
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.