09-18-2001
I tried everything but I couldn't get this to work. I'm pretty sure that the problem in the NULL character. To a c program, a string is terminated by a null and grep seems to be behaving that way. Maybe
grep 0001 | grep N
will help you a little.
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
I'm testing out some ESMTP AUTH stuff, and it requires that the username and password be on the same line separated by a null character. Does anyone know how to echo the ASCII null character?
Thanks,
Alex (3 Replies)
Discussion started by: vertigo23
3 Replies
2. UNIX for Dummies Questions & Answers
Hi,
I would like to use grep to find files which contain NULL characters. I'm not sure how to represent the null character in the grep statement.
Could anyone help please?
Thanks!
Helen :confused: (5 Replies)
Discussion started by: Bab00shka
5 Replies
3. Shell Programming and Scripting
Hi All,
I have a problem with Null values while reading line by line from a text file. I wrote a shell script to read set of file names from a text file line by line, and zipping the each individual file and copying those zip files into some separate directory, and removing the original file... (3 Replies)
Discussion started by: npk2210
3 Replies
4. UNIX for Dummies Questions & Answers
Hi,
I am trying to display the filename in which a string was found after using find and grep. For this after some googling I found that this works:
find -name "*.java" -exec grep "searchStr" {} /dev/null \;
I wanted to know the difference between the above and the following:
find -name... (0 Replies)
Discussion started by: gaurav_s
0 Replies
5. Programming
Assume client send the message " Hello ", i get output such as
Sent mesg: hello
Bytes Sent to Client: 6
bytes_received = recv(clientSockD, data, MAX_DATA, 0);
if(bytes_received)
{
send(clientSockD, data, bytes_received, 0);
data = '\0';... (2 Replies)
Discussion started by: f.ben.isaac
2 Replies
6. Shell Programming and Scripting
I have an input file having 7 fields delimited by ,
eg :
1,ABC,hg,1,2,34,3
2,hj,YU,2,3,4,
3,JU,kl,4,5,7,
4,JK,KJ,3,56,4,5
The seventh field here in some lines is empty, whereas the other lines there is a value.
How do I insert string NULL at this location (7th loc) for these lines where... (8 Replies)
Discussion started by: zilch
8 Replies
7. UNIX for Advanced & Expert Users
I have a huge file with record length around 5000 characters.
There is an ETL tool datastage which is writing this data to the file(AIX server). At position 4095 i have seen NULL Character(^@).
when i am using this command "head -1 file_nm | sed 's/\000//g'" --- the output is displaying... (3 Replies)
Discussion started by: issaq84mohd
3 Replies
8. Shell Programming and Scripting
DELETE=`cat $logfile1 | egrep -i "Delete" | sed 's/ */ /g' | cut -d" " -f2`
INSERT=`cat $logfile1 | egrep -i "Insert" | sed 's/ */ /g' | cut -d" " -f2`
UPDATE=`cat $logfile1 | egrep -i "Update" | sed 's/ */ /g' | cut -d" " -f2`
I need soming like below:
if value is null... (8 Replies)
Discussion started by: Veera_V
8 Replies
9. Shell Programming and Scripting
Hi,
Anyone can help using SED searches a character string for a specified delimiter character, and returns a leading or trailing space/blank.
Text file :
"1"|"ExternalClassDEA519CF5"|"Art1"
"2"|"ExternalClass563EA516C"|"Art3"
"3"|"ExternalClass305ED16B8"|"Art9"
...
...
... (2 Replies)
Discussion started by: fspalero
2 Replies
10. Shell Programming and Scripting
We have a flat file with below data :
^@^@^@^@00000305^@^@^@^@^@^@430^@430^@^@^@^@^@^@^@^@^@09079989530As we can see ^@ is Null character in this file
I want to remove only the first few null characters before string 00000305
How can we do that, any idea. I want a new file without first few... (5 Replies)
Discussion started by: simpltyansh
5 Replies
ZGREP(1) General Commands Manual ZGREP(1)
NAME
zgrep - search possibly compressed files for a regular expression
SYNOPSIS
zgrep [ grep_options ] [ -e ] pattern filename...
DESCRIPTION
Zgrep invokes grep on compressed or gzipped files. These grep options will cause zgrep to terminate with an error code:
(-[drRzZ]|--di*|--exc*|--inc*|--rec*|--nu*). All other options specified are passed directly to grep. If no file is specified, then the
standard input is decompressed if necessary and fed to grep. Otherwise the given files are uncompressed if necessary and fed to grep.
If the GREP environment variable is set, zgrep uses it as the grep program to be invoked.
EXIT CODE
2 - An option that is not supported was specified.
AUTHOR
Charles Levert (charles@comm.polymtl.ca)
SEE ALSO
grep(1), gzexe(1), gzip(1), zdiff(1), zforce(1), zmore(1), znew(1)
ZGREP(1)