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@dateThu Nov 28 18:12:47 IST 2013my terminal$ ddtae@ddtae@: command not foundAnother example is to use # to erase last character book$ dd#att#e#ewhich comes out as date and print it. my terminal$ dd#att#e#edd#att#e#e: command not foundin 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.
How do you find what keys the erase and line-kill characters are in Ubuntu?
shell;command line;tty;history;key mapping
Terminal line control can be queried and/or set by stty.  To see the current settings, use stty -a.  The manpages provide details.For example, from stty -a you might find this kill-line control: kill = ^UThe caret means hold the control key (Ctrl) and then type the character shown (U).  To change the line-kill sequence, you could do:$ stty kill \@NOTE: The backslash is an escape to signify that the character following is to be interpreted literally by the shell.Having changed your line-kill to this, (a literal @), you can now obliterate a line that looks like:$ ddtae@NOTE: In the above, scenario, when you type ddtae, when you type the character @, the entire line will be erased.One way to restore the default settings (and this is very useful when you have inadvertently altered settings) is to simply do:$ stty saneYet another use of stty is to control character echo-back.  For instance, a simple way to hide a user's password as (s)he types it is to do:#!/bin/shecho Enter passwordstty -echoread PWORDstty  echoecho You entered '${PWORD}'