On 0, Guillaume CHARDIN <guillaume.char...@gmail.com> wrote: > Hi, > > In a backup process of some xen virtual machine, i need to extract in > the config file some informations (in fact the disk line) . > The line look like this : > disk = [ file:/path/to/file,sda1,w ] > my goal is to isolate le `file` part to use it later. I'm a beginner > with sed/grep and [...]
I know this isn't the answer you were looking for, but here is an easy way to isolate it in Perl; $string = "disk = [ file:/path/to/file,sda1,w ]"; $string =~ s/^.+://; $string =~ s/ ]$//; ($path,$name,$perms) = split(",", $string); -- http://fuzzydev.org/~pobega http://identi.ca/pobega -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org