A question need your kind help!
If you want to match only numbers, you might use:
[[:digit:]] Could you please help me to give an example on how to use [[:digit:]]? Thanks Br. |
Quote:
Code:
then, remove digits (substitute with nothing) Code:
cat count | sed 's/[[:digit:]]//g' |
Quote:
This is what is generally called a "regular expression" (AKA regex)---which I think can be defined as a string of characters used to designate classes or types of data as opposed to specific data. Examples: "." = any character "*" = any number of the preceding regex thus: ".*" = any number of characters regexes are used in a wide variety of utilities--eg SED, AWK, GREP--and in programming languages such as PERL. [ ] defines a "character class", and [:digit:] is a character type [[:digit:][:blank:]] = a single number or a white space Good tutorial here: http://www.grymoire.com/Unix/ |
All times are GMT -5. The time now is 10:32 PM. |