Hey mark!
i'm assuming that the above quote really does have ">[" in it
No it doesn't. In reality the ansi escape sequences both start with the C0 control character 0x1B. In vim it shows up as a blue coloured ^[ character combination.
temp file and then view it, i can see the ANSI :)
Same situation here. I wrote a bash script I call msg-read.sh that uses gawk to print the 5 fields from raw msg's which preserves as well as honours the ascii escape sequences and the end result is more or less what you would see on
a BBS. I don't bother with line and/or box drawing characters and use = to divide the msg_body from the 'header'; Date, To, From, and Subj, as well as add
those labels to the appropriate field. Also I pipe that to 'fold -s -w n' to add soft word wrapping when needed. I could add 'n=$(tput cols)' to the script
so it would automagically know the width and then 'fold -s -w n' to add the soft wraps in exactly the right position (the nearest space to the end of that terminal line). That way different terminals with different dimmensions would wrap according to their needs using the exact same script -> 604 bytes as it stands today.
Life is good,
Maurice
... Don't cry for me I have vi.
--- GNU bash, version 5.0.3(1)-release (x86_64-pc-linux-gnu)
* Origin: Little Mikey's Brain - Ladysmith BC, Canada (1:153/7001)