The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
get rid of special characters vakharia Mahesh UNIX and Linux Applications 4 07-29-2008 02:36 PM
grep with special characters guruparan18 UNIX Desktop for Dummies Questions & Answers 3 06-12-2008 06:58 AM
Grep with Special Characters Vashj Shell Programming and Scripting 6 11-27-2007 06:51 AM
special characters nawnaw UNIX for Dummies Questions & Answers 2 05-18-2004 04:17 PM
awk/sed with special characters apalex Shell Programming and Scripting 5 05-06-2002 05:40 PM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 07-31-2008
gugs gugs is offline
Registered User
  
 

Join Date: Jul 2008
Posts: 44
Grep not working - special characters??

I have a file that I am processing with a while loop from, in come cases the grep/sed command (strings record | grep “errorDetail” | sed 's&*errorDetail\(.*)\(/errorDetail\).*&\1&') works and produces the data I am after and in some it does not. I have inspected the data within the failing records, they definitely contain the 'errorDetail' field that I am after. I am of a strong suspicion that some of the records contain some characters that the grep does not like. However, I do not know which chars. It may be some binary character that is causing the problem. When I put each record thorugh s/[!@#\$%^&*()]//g' filename, some of the records that were giving me incorrect data give me the errorDetail. However, not all. Any ideas how I can resolve this issue?

Last edited by gugs; 07-31-2008 at 07:19 AM..
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 11:10 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0