- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Removing a '\" from a flat file
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
тАО11-21-2008 07:28 AM
тАО11-21-2008 07:28 AM
Informix placed a "\" in null fields. I'd appreciate any pointers on how to either fix the SQL script, or script a perl substitution that yanks the "\" and replaces it with a space.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-21-2008 07:34 AM
тАО11-21-2008 07:34 AM
Re: Removing a '\" from a flat file
I thought initially I could do
perl -pi -e s/'\'//g filename.csv
I get the following error:
# perl -pi -e s/'\'//g ralalertnow.csv
Substitution replacement not terminated at -e line 1.
- Tags:
- Perl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-21-2008 07:35 AM
тАО11-21-2008 07:35 AM
Re: Removing a '\" from a flat file
# perl -pe 's/"\\"/" "/g' file
...and if you want to update "in-place":
# perl -pi.old -e 's/"\\"/" "/g' file
...which preserves the original file as "file.old".
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-21-2008 07:35 AM
- Tags:
- sed
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-21-2008 07:52 AM
тАО11-21-2008 07:52 AM
Re: Removing a '\" from a flat file
> I tried the perl version and it failed to string the '\' Dennis's sed script worked..
Yes, Dennis's script blindly replaces ALL backslashes with spaces. Is that what you really want?
You didn't make that very clear in my opinion. I replaced only "\" by " ".
Regards!
...JRF...