The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #6 (permalink)  
Old 05-22-2006
vino's Avatar
vino vino is offline
Supporter (in vino veritas)
 

Join Date: Feb 2005
Location: Bangalore, India
Posts: 2,643
Quote:
Originally Posted by shereenmotor
Code:
egrep '^a\{2,6\}$' testexpr4D
shereenmotor, that solution is pretty close, but no cigar !

You are mixing the syntax's of sed and [e]grep.

If it were sed, it would be

Code:
sed -n -e "/^a\{2,6\}$/p" filename
If it were grep it would be

Code:
egrep '^a{2,6}$' filename
Reply With Quote