Mailinglist Archive: opensuse (1599 mails)

< Previous Next >
Re: [opensuse] Re: Where is the USB hd?
nimrodel:~ # cat /proc/partitions | grep -e "sd\?"
major minor #blocks name
8 0 1993728 sda
8 1 1993608 sda1
nimrodel:~ #
Now, I wonder why the header line got through the grep... useful, but I
don't know why :-?

The question mark matches *zero* or one of the *preceding* element.

Hence the "s" in "blocks" matches the provided regular expression: "s"
followed by *zero* or one "d".

--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups