PDA

View Full Version : sed help



cupoftea
9th May 2006, 06:06 AM
If I were to echo 'iwant1234cupsoftea.thankyou'. How do I get sed to display only '4cupsoftea'?

giulix
9th May 2006, 11:30 AM
echo "iwant1234cupsoftea.thankyou" | sed "s/[\.].*//" | sed "s/.*3//"