You are not logged in.
how would i accomplish this, i want to strip everything in a line and keep quoted text in within simple quotes: like this
'some text here'
would end up as
some text here
im lost due to the nature of single quotes
Offline
echo "no print 1 'print 1' no print 2 'print 2' no print 3" | sed -n "s/[^']*'\([^']*\)'[^']*/\1/gp"
Offline
echo "no print 1 'print 1' no print 2 'print 2' no print 3" | sed -n "s/[^']*'\([^']*\)'[^']*/\1/gp"
thanks, i found it really difficult to escape the ' char this works ok
just for anyone caring. i needed to have a random thumbnail on my desktop with my favorite pics
Last edited by eldragon (2009-04-01 15:30:51)
Offline