Search Results

Search: Posts Made By: grepeverything
2,338
Posted By grepeverything
hi, I know you've already got a solution but...
hi,
I know you've already got a solution but just to say there is another way which gives you pretty much the same output you wanted:
grep -o '^\<[[:alnum:]]*\>' yourtextfile | sort | uniq -c |...
2,186
Posted By grepeverything
Are you trying to get fields 3-24 from each row...
Are you trying to get fields 3-24 from each row and assign each field to a variable? Or put them vertically? What is the greater problem?
4,116
Posted By grepeverything
This doesn't do exactly what you want but comes...
This doesn't do exactly what you want but comes close in a simple way. I just mention it as an f.y.i. as to another approach:
grep -A 1 -E '^FATAL|ERROR ' inputfile | tail -6Gives output like:
--...
8,379
Posted By grepeverything
tail -2 infile | grep -oP...
tail -2 infile | grep -oP '(?<=\()[[:digit:]]+(?=\))' Assumes last line never has a pattern like "(nnnnnn)", where n are some number of digits. Pattern matches one or more (+) digits between...
6,265
Posted By grepeverything
I think radoulov's solution is cleaner but this...
I think radoulov's solution is cleaner but this should work also:

ls -1 *.csv | awk '{print "mv " $1 " newdir/"$1}' | sed -E 's/([[:alpha:]]+)_[^_]+(\.csv)/\1\2/2' | csh
The regex takes one or...
4,110
Posted By grepeverything
Maybe this would also work for you: (or use...
Maybe this would also work for you:

(or use grep -Eo ... instead of egrep)
The grep basically says just print the matched pattern, which is anything but a pipe symbol ("[^|]", repeated more than...
15,786
Posted By grepeverything
Maybe this would also work for you: (or use...
Maybe this would also work for you:

(or use grep -Eo ... instead of egrep)
The grep basically says just print the matched pattern, which is anything but a pipe symbol ("[^|]", repeated more than...
3,094
Posted By grepeverything
Or maybe like: (or pipe to csh or whatever...
Or maybe like:

(or pipe to csh or whatever shell you want I think).
Forum: AIX 01-23-2011
7,862
Posted By grepeverything
I think this should work too:
I think this should work too:
2,171
Posted By grepeverything
I did not read and try to understand in depth...
I did not read and try to understand in depth what your script does but maybe this helps--it's in response to your original request to just print the file name from find output:



This strips...
3,058
Posted By grepeverything
You have a space missing at the beginning of the...
You have a space missing at the beginning of the pattern and the ":" missing the named character class [:alnum:]

egrep -i '***SPACE***[[:alnum:]_]+=[[:alnum**COLON**]_]+\.SQL '
The space is...
3,058
Posted By grepeverything
hm, well you could just download (& build &...
hm, well you could just download (& build & install) gnu grep, which does have the -o and -P switches:http: / / directory.fsf.org / project / grep /
(remove the spaces)

Otherwise, this sort of...
3,058
Posted By grepeverything
If you describe what "can't get it to work" means...
If you describe what "can't get it to work" means I might be able to help. I could imagine maybe your version of grep is different, e.g. maybe doesn't support the -P option.
3,058
Posted By grepeverything
I'm not totally sure what you want to do in the...
I'm not totally sure what you want to do in the end, so maybe I'm way off here. If so, sorry.

Given your snippet,
Assume that is in a file called "bla.txt".
This:
Will output:
PROCNAME1...
Showing results 1 to 14 of 14

 
All times are GMT -4. The time now is 12:41 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy