Search Results

Search: Posts Made By: ceemh3
33,204
Posted By ceemh3
Grep a line with between 3 and 5 digits
Hi,

I am having problems using grep to extract only 3,4 or 5 digit numbers from a text file, using:

grep '\<[0-9]\{3,5\}\>' test.txt
or
grep '[0-9]\{3,5\}' test.txt
or
egrep '[0-9]{3,5}'...
75,906
Posted By ceemh3
Hi thanks a lot Kahuna, that works great
Hi thanks a lot Kahuna, that works great
75,906
Posted By ceemh3
Get Filename and Line Number using grep
Hi,

I am using the Korne shell to try and get the filename, line number and the line of text using grep e.g.

find ./ -type f -name "*.java" -exec grep -nf test.txt '{}' \;
(test.txt contains...
Showing results 1 to 3 of 3

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