Guest_imported
New member
- Jan 1, 1970
- 0
Friends , a stupid question.
Following is the file of 9 lines (sample.txt) :
900
12356
2.1
3.14159265
87878787
0.25
a
if i give command ,
sed -n -e '/900*/p' sample.txt
I get output of just one line ,
900
Now if I give command ,
sed -n -e '/[09]*/p' sample.txt
I get all the lines in output ,
900
12356
2.1
3.14159265
87878787
0.25
a
Why is that ?? I am expecting combination of only 0 & 9 in output .
Please advice.
Following is the file of 9 lines (sample.txt) :
900
12356
2.1
3.14159265
87878787
0.25
a
if i give command ,
sed -n -e '/900*/p' sample.txt
I get output of just one line ,
900
Now if I give command ,
sed -n -e '/[09]*/p' sample.txt
I get all the lines in output ,
900
12356
2.1
3.14159265
87878787
0.25
a
Why is that ?? I am expecting combination of only 0 & 9 in output .
Please advice.