Skip to main content

All Questions

Filter by
Sorted by
Tagged with
18 votes
4 answers
3k views

What is the rationale for \r and \n meaning different things in s command?

We all know that, when searching, \n is newline and \r is carriage return (^M), but when replacing \r is newline while \n is a null byte (^@). What is the origin of this asymmetry? Given that this ...
Matteo Italia's user avatar
4 votes
1 answer
383 views

Traditional Vi and its regular expressions

I'd just want to get confirmation on (and maybe some background to) the way that Bill Joy's vi, sometimes found as traditional-vi on some BSD systems, handles regular expressions. It seems as if most ...
Kusalananda's user avatar