desed
desed copied to clipboard
Running desed without -E option on macos 13 generates an unknown error
Running this sed code through desed without -E option on macos 13 generates an error attached below.
#!/usr/bin/sed -nE -f
/<p>Platnost/ {
s_[^0-9]*([^,]*)[^0-9]*([0-9]*).*_\1 #\2_
s/([0-9]+.) ([0-9]+.) ([0-9]+)/\1\2\3/p
}
/<tr/ {
:a
n
s/<(td|th)[^>]*>([^<]*)<\/(td|th)>/\2/
H
ta
}
$ {
g
s/<\/tr>//g
s/\n[ \t]*/\|/g
s/$/\n/
s/\|\|/\n/g
s/^\|//g
s/\|\n$/\n/g
p
}