Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

My issue is a bit unusual, so I want to provide a short background. I was looking at old winners of the International Obfucated C Code Contest, and came across an entry written for the PDP-11 (the entry is here, for those interested). So, I searched for an emulator, which I found at http://simh.trailing-edge.com/, and booted it with UNIX v7 (from the same site). Again, for those interested, I found instructions on booting it at http://wandel.ca/homepage/unixdemo.html.

With that background in mind, here is my actual issue. As I was typing the program into ed, it was being funny about hash characters. They wouldn't actually save in the file. After a lot of research, I discovered it was emulating a physical teletypewriter (!), and since you couldn't backspace a character printed on paper, a hash meant "ignore the previous character".

So my question is this: How do I actually type a hash character?

share|improve this question
    
Probably backslash shift 3. Or Ctrl-V, shift 3. –  Mikel Dec 7 '12 at 4:57
    
@Mikel Ah, backslash shift-3 did it (Ctl-V shift-3 didn't, just for the record). Thanks! –  Dominick Dec 7 '12 at 5:10

2 Answers 2

up vote 4 down vote accepted

On very old systems, # would delete the previous character, and @ would kill the whole line.

To type a literal # or @, you need to type a backslash first, to escape it, e.g. \# = #.

These days, the same functionality is provided by the terminal's lnext setting, which defaults to Ctrl+V.

See also:

share|improve this answer

I'm not sure that V7 supports stty erase, but if it does, use that to change erase character to something sane.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.