В Mon, 31 May 2010 21:13:39 +0600
Sergey Korobitsin <[email protected]> пишет:

> Nicholas ☫ → To [email protected] @ Mon, May 31, 2010
> 10:55 +0000
> 
> > Как можно заменить все фрагменты, которые начинаются, например, на
> > "background-color:" и заканчиваются на ";" ,  на "xxx" ?
> 
> cat file | sed -e '{ s/background-color:.*;/xxx/g }'
> 
> Как-то так, не?

$echo "11111 background-color: #sdfdfdf; 44444444 background-color: black; 
00000" | sed -e 's/background-color: .[^;]*;/xxx/g'
$11111 xxx 44444444 xxx 00000

-- 
Best Regards,
Yuri Kozlov


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]
Archive: http://lists.debian.org/[email protected]

Ответить