Hacker News new | past | comments | ask | show | jobs | submit login

Awk really has been superseded by Perl (and therefore arguably by Python, Ruby, etc.) But sed remains a thing of beauty, all its own, and very well worth learning. Hardly a day goes by that I don't use it in some one-off command like

    for i in *.png; do pngtopnm < $i | cjpeg > `echo $i | sed 's/png$/jpeg/'`; done



  for i in in *.png ; do
    pngtopnm $i | cjpeg > ${i#.png}.jpeg
  done




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

Search: