[CentOS] OT: piped greps with regex
Stephen Harris
lists at spuddy.orgMon Jan 4 21:59:41 UTC 2010
- Previous message: [CentOS] OT: piped greps with regex
- Next message: [CentOS] Shutdown/poweroff does not power off machine
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Mon, Jan 04, 2010 at 12:53:45PM -0800, Mr. X wrote: > Last effort led to this > $ sudo file mini_vusb.img | grep -Po 'startsector\s+\d+'| grep -Po '\d+' > 32 > > I like this best. Is there a way to shorten it up? Use the correct tool; "sed" sed 's/^.* startsector \(.*\),.*$/\1/' -- rgds Stephen
- Previous message: [CentOS] OT: piped greps with regex
- Next message: [CentOS] Shutdown/poweroff does not power off machine
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the CentOS mailing list