fork download
  1. #!/bin/bash
  2. s='aaa
  3. print("Some single line text etc... "
  4. ddd
  5. print("""Some multi line text etc... """)
  6. zzzz'
  7. sed '/print("""/!{/print("/s/$/)/}' <<< "$s"
Success #stdin #stdout 0s 4696KB
stdin
Standard input is empty
stdout
aaa
print("Some single line text etc... ")
ddd
print("""Some multi line text etc... """)
zzzz