- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- sed substitution question
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-10-2005 11:04 AM
тАО01-10-2005 11:04 AM
sed substitution question
s/"[a-zA-Z]""[a-zA-Z]""/"[a-zA-Z]""[a-zA-Z]",/
- Tags:
- sed
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-10-2005 05:59 PM
тАО01-10-2005 05:59 PM
Re: sed substitution question
root@SD /tmp/sed> sed s/\"[a-zA-Z][a-zA-Z]\"/\&\,/g input
"AA",bbccdd
AA"bB",ccdd
AABB"Cc",dd
AABBcc"dD",
AABB"cc",DD
"c"ABCDEFG
root@SD /tmp/sed> cat input
"AA"bbccdd
AA"bB"ccdd
AABB"Cc"dd
AABBcc"dD"
AABB"cc"DD
"c"ABCDEFG
root@SD /tmp/sed>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-10-2005 06:31 PM
тАО01-10-2005 06:31 PM
Re: sed substitution question
to replace AA" by AA, :
sed 's/\([a-zA-Z][a-zA-Z]\)"/\1,/g' input
to replace "AA" by AA, :
sed 's/"\([a-zA-Z][a-zA-Z]\)"/\1,/g' input
regards,
Thierry.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-10-2005 06:32 PM
тАО01-10-2005 06:32 PM
Re: sed substitution question
use the back slashes as told by Matthew
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-11-2005 02:15 AM
тАО01-11-2005 02:15 AM
Re: sed substitution question
Thierry, what about a condition wehere you want to replace
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-11-2005 03:54 AM
тАО01-11-2005 03:54 AM
Re: sed substitution question
sed 's/ \([a-zA-Z]\)/,\1/g' input
(= sed 's/
regards,
Thierry.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-11-2005 11:16 PM
тАО01-11-2005 11:16 PM