Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

That's why awk is so often used with sed, as awk is great for the first part while sed is very good for the second. For example:

    echo $BUNCH_OF_TEXT | awk '/amazing/ {print $1, $3}' | sed 's/amazing/mildly interesting/'


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: