Your request is a bit difficult to understand. What be the CF char? What is "date"? For the others, you don't need a script but can use e.g. grep with a regex like
grep [^[:alnum]&] client.txt is incorrect for various reasons.
You are missing a colon at the end of alnum, before ]; to make it an alphanumeric class set [:alnum:] Search some more for it if you want to know what that set would include.
The [^] means exclude the following
The & has to be escaped or protected, since it has special meaning for the shell
In English, it says to grep:
search in the file client.txt for any character that is not an alphanumeric or an ampersand.
Therefore it would show:
Let's add spaces into the exclusion class set
Let's exclude the (') from the list of wanted. Since (') has special meaning for the shell we have to change the quoting scheme that we use.
I think this should be enough, now, to understand and figure out what you must do. Take another look at RudiC's initial exclusion class set.
HI Team,
I have script to find the invalid character in file.
f=’pallvi\mahajan’
n=0
while (( $n <= ${#f} ));
do
c="${f:$n:1}"
echo '$c'
if *] ]];
then
grep -sq $c valid.txt
if ;
then
echo "$f" >> f.txt
break
fi
fi (18 Replies)
Hi,
In a error log file, the error code of a particular error contains both Alphabet and Numbers. My problem statement is to find the error codes from a particular log. That means, I need to search a word, which contains both alphabet and number. Please help me. Below is two examples of error... (1 Reply)
Hi,
I have a log file and want to search "0.48976360737438795" with excluding new line character.
Currently i am using the following command:
cat LogFile.log | tr -d '\n' | grep '0.48976360737438795'
This command giving me the response if file size is small but if i am using a big file... (11 Replies)
Dear UNIX Community,
I have a set of file paths like the one below:
\\folder name \ folder1 \ folder2 \ folder3 \ folder4
\\folder name \ very long folder name \ even longer name
I would like to find the length of the characters (including space) between the \'s. However, I want... (6 Replies)
While uploading an exl file to my application in Solaris 10 the upload failed with error Error! Parsing Error: /SPLM/TC83/tcdata83/model/model_dbextract.xml Line:65576 Column:73 An invalid XML character (Unicode: 0x1a) was found in the value of attribute "unitOfMeasureSymbol" and element is ... (12 Replies)
Hi,
I am using a Perl script to generate a report file in Linux server. When my input data contains an invalid character which looks like hyphen after that my program is printing junk values in the report. Why that symbol is causing issue and is there a way to tell the server that this is a valid... (1 Reply)
I have a co-worker that is trying to make a Wheel of Fortune game and he wants to know if there is a way to search a string for the letter given by the user. (7 Replies)
I need to search in text files for the $ character. I tried putting it in double quotes and single quotes . ie grep "$" filename but unix finds everything in the file.
Whats the best way to do this?
thanks (4 Replies)