fork(1) download
  1. #!/bin/bash
  2. s='something
  3. CAKE_FROSTING(
  4. "is supreme",
  5. "[i][agree]") something else
  6. something more
  7. something else
  8. CAKE_FROSTING(
  9. "is."kinda" neat"
  10. "in fact",
  11. "[i][agree]") something else
  12. something more'
  13. perl -0777 -ne 'while (/CAKE_FROSTING\(\s*"([^,]*)"/g) {$a=$1; $a =~ s/^"|"$|(\R+)/$1?" ":""/gme; print "$a\n"}' <<< "$s"
Success #stdin #stdout 0.01s 5440KB
stdin
Standard input is empty
stdout
is supreme
is."kinda" neat in fact