2

Found this in a shell script. Instead of just one regex, why not use grep and sed, even though you could have just done it all with sed!

IMAGE_TAG=`grep defproject project.clj | sed -e 's/^.* \"//' -e 's/\"//'`

Comments
  • 7
    To be fair, I find shell scripting so unreadable that I usually end up with 4 greps and then just do it in python
  • 3
    To be fair, recursive sed+awk is my favorite form of passive aggression.
Add Comment