Re: help : cat help | grep '^99\d' don't work



On 2006-12-02, key9 wrote:
hi all

I have an file:
980<tab>980
981 981
982 982
983 983
984 984
985 985
986 986
987 987
988 988
989 989
990 990
991 991
992 992
993 993
994 994



I hope I can using "^99\d" to list 99x
or using "^992\t" to list "992"

but that don't work , why?

I have tried using [\d]... , no use.

grep '^99[0-9]'

grep '^992'

--
Chris F.A. Johnson, author <http://cfaj.freeshell.org/shell>
Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
===== My code in this post, if any, assumes the POSIX locale
===== and is released under the GNU General Public Licence
.



Relevant Pages

  • Re: how to get the pid from ps
    ... the output from ps -ef | grep my.jar is: ... Remove multiple spaces: ... A Problem-Solution Approach (2005, Apress) ...
    (comp.unix.shell)
  • Re: Getting the file name
    ... Thought the file name would be $i, but printing that gives me the grep ... A Problem-Solution Approach (2005, Apress) ...
    (comp.unix.shell)
  • Re: find a file containing two words in different lines
    ... Use grep -l to greate a list containing one of the words, ... Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress) ...
    (comp.unix.shell)
  • Re: Command substitution
    ... need grep: ... A Problem-Solution Approach, 2005, Apress ...
    (comp.unix.shell)
  • Re: while read line
    ... one starts with fixedStep, etc, the other one is a number, such as ... grep: fixedStep: No such file or directory ... Use case to check whether a string contains another string: ... A Problem-Solution Approach (2005, Apress) ...
    (comp.unix.shell)