From: Fabrice Guerini (fabrice@BLUEMARTINI.COM)
Date: Fri Jul 19 2002 - 16:45:20 EDT
Lose the "*". Just use
sed -n -e '/[09]*/p' sample.txt
-- F. At 01:16 PM 7/19/2002, Y.SINGH@PONL.COM wrote: >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. > > >------------------------------------------------------------------- > >The contents of this e-mail are confidential to the ordinary user >of the e-mail address to which it was addressed and may also be >privileged. If you are not the addressee of this e-mail you should >not copy, forward, disclose or otherwise use it or any part of it >in any form whatsoever. If you have received this e-mail in error >please notify us by telephone or e-mail the sender by replying to >this message, and then delete this e-mail and other copies of it >from your computer system. Thank you. > >We reserve the right to monitor all e-mail communications through >our network. +===========================================================+ | Fabrice "Script It!" Guerini Blue Martini Software, Inc. | | Senior Operations Engineer 2600 Campus Drive | | Tel: (650) 356-7576 San Mateo, CA 94403-2522 | | Fax: (650) 356-4001 www.bluemartini.com | +===========================================================+
This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 22:16:04 EDT