Search Results

Search: Posts Made By: mirage
1,538
Posted By mirage
grep to show patterns being matched (-f option)
I have a list of patterns (regexes) in a file and use with `grep -f <file_with_list_of_regexes.txt> input.txt` to search in my input for those patterns. grep is doing a fantastic job at it and finds...
3,000
Posted By mirage
# echo 3 | grep ^[123456789]+$ # echo 34 | grep...
# echo 3 | grep ^[123456789]+$
# echo 34 | grep ^[123456789]+$
#

but why not the above print "3" and "34" (respectively) if '+' should match one or more of the previous characters?
3,000
Posted By mirage
understood. Now I realize I also misinterpreted...
understood. Now I realize I also misinterpreted the output of `echo 3 | grep ^[0123456789]*$` even though it showed the result I expected.

I should be reading it as:
"Match characters
^ -...
3,000
Posted By mirage
Question on regex with * and .
I have a basic question regarding * and . while using regex:

# echo 3 | grep ^[0123456789]*$
3

I think I understood why it outputs "3" here (because '*' matches zero or more of the previous...
Forum: Red Hat 05-17-2010
48,575
Posted By mirage
Cannot ping gateway
I know the subject line is very similar to: destination host unreachable (http://www.linuxquestions.org/questions/linux-networking-3/destination-host-unreachable-307368/)

but the problem with my...
Showing results 1 to 5 of 5

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