That wasn't part of your problem statement, was it? Anyway,
To be clear:
int a123,b,c; --- legal
int 12a,b; ---- illegal since the variable starts with a number
int A,b,c ---- illegal since the variable starts with [A-Z]
A few valid lines that should match (only when a variable occurs more than once):
int a,b,a;
int a,b,b;
int a,b,c,a,g;
---------- Post updated at 03:12 PM ---------- Previous update was at 03:07 PM ----------
Quote:
Originally Posted by DGPickett
Wrong comes in so many flavors, like integral calculus. Even right has a lot of flavors. First there are the datatypes, then the commas, the initializations, typedefs, unions, structs, Classes, code, continued lines, includes, macros.
Why not cc -c ? I hope it knows enough to catch that. There may even be c verification tools out there. Ever try lint?
Hi,
I am currently using grep -c to scan lines for certain data. I am just wondering if you can search a specific column of a file using grep -c.
Thanks (6 Replies)
I'm using grep in a shell and I was wondering:
Can I grep a file and then delete all files that contain what it returns?
So instead of grep 'blah' * and I have 50 files that have blah in it and I would have to delete all 50 manually, how would I just delete them all in one fell swoop? (3 Replies)
Hi,
I am executing the below command.
grep ".UPDATE" file1.txt | grep -v MQQUEUE > Myprog1
The expected output is all lines in file1.txt which have the string ".UPDATE" and dont contain the string MQQUEUE.
However, the output which I am getting is just searching for the string... (3 Replies)
My SQL is very rust and I'm having a problem with a query.
First, here are the tables involved.
Table `os`:
+--------------------------------+
| id | distro | version |
+--------------------------------+
| 1 | CentOS | 5.2 |
| 2 | RHEL | 5 |
| 3 ... (1 Reply)
Instead of using the following command
#dmesg | grep -v sendmail | grep -v xntpd
How can I use just one grep -v and give both arguments.
Please suggest
thanks (4 Replies)
Hello,
Is there a way in grep to remember patterns?
For eg: int a,b,c,d,a;
If a variable is declared twice, like in the previous example, I should be able to print only those lines.
Is there a way to print only the lines where the variable name occurs more than once, using grep... (1 Reply)
All,
I am wanting to find out if I can do this in one grep statement
grep -R failed * |grep -iEw 'Mar 1|Feb 2'
I want to search all files in a directory for the text "failed" AND a "date or date".
Currently, I am using the above running one grep and then piping it to another. It works,... (3 Replies)
is there anyway i can ask grep to only get the first line?
as in the top command line
line 1 <-- just grep this line
line 2
line 3
---------- Post updated at 04:24 PM ---------- Previous update was at 04:19 PM ----------
nvm.. found out that i can do it with
|head (12 Replies)
Discussion started by: Nick1097
12 Replies
LEARN ABOUT CENTOS
lzegrep
XZGREP(1) XZ Utils XZGREP(1)NAME
xzgrep - search compressed files for a regular expression
SYNOPSIS
xzgrep [grep_options] [-e] pattern file...
xzegrep ...
xzfgrep ...
lzgrep ...
lzegrep ...
lzfgrep ...
DESCRIPTION
xzgrep invokes grep(1) on files which may be either uncompressed or compressed with xz(1), lzma(1), gzip(1), bzip2(1), or lzop(1). All
options specified are passed directly to grep(1).
If no file is specified, then standard input is decompressed if necessary and fed to grep(1). When reading from standard input, gzip(1),
bzip2(1), and lzop(1) compressed files are not supported.
If xzgrep is invoked as xzegrep or xzfgrep then egrep(1) or fgrep(1) is used instead of grep(1). The same applies to names lzgrep, lze-
grep, and lzfgrep, which are provided for backward compatibility with LZMA Utils.
ENVIRONMENT
GREP If the GREP environment variable is set, xzgrep uses it instead of grep(1), egrep(1), or fgrep(1).
SEE ALSO grep(1), xz(1), gzip(1), bzip2(1), lzop(1), zgrep(1)Tukaani 2011-03-19 XZGREP(1)