0

I'm new to Unix and have bought today a copy of "The Unix Programming Environment". I'm trying out the stuff from the book. But some of them are not working as expected like : To kill a line and re-type it again, @ character should be used :

book

$ ddtae@
date
Thu Nov 28 18:12:47 IST 2013

my terminal

$ ddtae@
ddtae@: command not found

Another example is to use # to erase last character

book

$ dd#att#e#e

which comes out as date and print it.

my terminal

$ dd#att#e#e
dd#att#e#e: command not found

in my system # is used for commment

Although they have mentioned that these characters are system dependent. How can i find the characters for my system to perform above two tasks.

2

2 Answers 2

0

The book is still correct, when it says that these things are system dependent. That said in bash (and at least zsh) Ctrl+u should delete everything left of your cursor and a simple Backspace (or Ctrl+h) should delete one character left of your cursor.

As for finding out such things:

If you are using bash (the default on ubuntu) man bash especially the section on "READLINE" will have some pointers.

With zsh you can find a list of configured key bindings with thie bindkey command.

0

The Unix Programming Environment... From 1983/4?

I'm honestly not sure how much use their terminal stuff is going to be. Bash has changed a bit since... Hang on, Bash didn't exist until '89.

It's a good book (I tried to read it while I was at uni and failed miserably) but you can't take the examples as written anymore. A lot of the C stuff should still work though.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .