I have a file where I want to grep for lines that start with either -rwx or drwx AND end in any number.
I\'ve got this, but it isnt quite right. Any ideas?
It looks like you were on the right track... The ^ character matches beginning-of-line, and $ matches end-of-line. Jonathan's pattern will work for you... just wanted to give you the explanation behind it
^
$