11-26-2012
Is it possible to change the output ^C to something else like a space?
Quote:
Originally Posted by
jim mcnamara
Rather than me blindly giving you code, try using ansi escape sequences inside the
trap statement. Use them to:
Save the cursor position,
then move it to a safe spot,
read foo,
restore the cursor.
The CSI sequences and some of the SGR sequences in this page are worth playing around with a bit. There is a CSI code to turn off the cursor. Some terminal settings are affected by locale, too. If you are using an Asian locale, you are probably using unicode or another wide charset.
See:
ANSI escape code - Wikipedia, the free encyclopedia
10 More Discussions You Might Find Interesting
1. Programming
hi
i´m making a program, and i would like to know how can i know what key was pressed. i'm using Sun5.7 and C.
is there a keypress/keypressed function in C?
how can i know recognize the keys (enter, tab, shift, etc.)?
can i recognize two keys ? (shift+A, ctrl+C, etc)
any idea.. thanks (4 Replies)
Discussion started by: DebianJ
4 Replies
2. AIX
I wrote a ksh script for Helpdesk. I need to know how to disable ctrl-c,ctrl-z,ctrl-d..... so that helpdesk would not be able to get to system prompt :confused: (6 Replies)
Discussion started by: wtofu
6 Replies
3. Shell Programming and Scripting
Hi there,
I'm using HP-UX 11 machine. I am running a script, thats gonna take a long time to execute. When I press ctrl-c to come out of my script, I have to catch that signal(ctrl-c) and display that ctrl-c had been pressed. How can I do it.
Thanks in advance (2 Replies)
Discussion started by: sendhilmani123
2 Replies
4. Shell Programming and Scripting
Hello friends,
I want to write a shell script in bash shell .
Working for the script is to detect any key pressed and disply on screen as
"you have pressed: "
For example if user pressed F5 then a messaged has to be displayed as
"you have pressed F5.
Thank you. (4 Replies)
Discussion started by: pradeepreddy
4 Replies
5. Shell Programming and Scripting
hi Gurus, please why is this happening:
when i run this:
#!/bin/bash
declare -a name
declare -a ph
declare -a eid
r=0;
c=1;
i=1;
n=;
echo " name phone email_id"
while :
do
#if ; then
#break;
#else
echo -n "field $i:"; read name ph eid;
let "i++";
... (5 Replies)
Discussion started by: tprayush
5 Replies
6. Shell Programming and Scripting
H! I have written script where it need to invoke the perl script in background, then write the pid in temp file then bring back the job to foreground. whenever the Ctrl-C or Ctrl-Z is pressed in the script has to exit and prompt should be dispalyed. but this script causing exit from shell session... (2 Replies)
Discussion started by: jramesh1
2 Replies
7. Shell Programming and Scripting
Hi all,
I need to know how to test a pressed key is arrowup or arrowdown and etc..
I found that the "echo" won't print anything if i enter the arrowup in the below code:
read
echo "you pressed $REPLY"
Then i find a way to achieve my goal.
1 #! /bin/bash
2
3 ARROWUP='\;then... (4 Replies)
Discussion started by: homeboy
4 Replies
8. Shell Programming and Scripting
Hi,
while executing shell script, in the middle of the process, if we kill the shell script( ctrl+z or ctrl+c), script will be killed and the files which using for the script will be in the folder.
How to handle those scenarios. Is there any possibilities, if user breaks the script, I need to... (3 Replies)
Discussion started by: ckchelladurai
3 Replies
9. UNIX for Dummies Questions & Answers
Hi friends,
I am trying to add a newline char ('\n') between the query and the commit statement in the following shell script.
#! /bin/sh
echo "select * from tab; commit;" > data.sql
I have tried typing in "Ctrl-V + Ctrl-J" combination which has inserted ^@ (NUL) character but the commit... (1 Reply)
Discussion started by: royalibrahim
1 Replies
10. Shell Programming and Scripting
Hi..!
I'm stuck with my automation of starting a process and keeping it running even after the current ssh session has exited..
So i'm trying to use command 'screen'. which is doing exactly what i wanted, But the problem is automation of the same.
i will have to press Ctrl+a and Ctrl+d for... (2 Replies)
Discussion started by: chandana hs
2 Replies
LEARN ABOUT DEBIAN
colrconv
COLRCONV(1) General Commands Manual COLRCONV(1)
NAME
colrconv - hamradio convers client with sound and ncurses color support
SYNOPSIS
colrconv [options] <host> [<service>]
DESCRIPTION
This manual page documents briefly the colrconv commands.
This manual page was written for the Debian GNU/Linux distribution because the original program does not have a manual page.
Colrconv is a modified version of VA3DP's ttylink client. In addition to the basic split screen session it gives you color and sound sup-
port plus some line editing capabilities, a scroll buffer and a status line. Also the default service is changed to 3600 (convers).
A new color is assigned to each user the first time he sends text and this color is used when displaying any subsequent text from this
user. Available colors are green, yellow, cyan, magenta, blue and red. These are used twice, the second time with BOLD attribute on. After
the colors run out they are used again.
Bold red is reserved for special messages (starting with ***) and for private messages (eg. <*oh2bns*>: Hello!).
Colrconv plays certain sound files when it receives text from the convers bridge. The files are: callsign.au (eg. oh2bns.au), unknown.au,
signedon.au says.au and pingpong.au. This feature is still a bit experimental and only works with older convers servers. Also you have to
make your own .au file. The rsynth package is good at this. See the readme for details. Sound files should go into /usr/lib/colrconv.
OPTIONS
-nocolor
Start colrconv in black and white, even if terminal has color support.
-c channel
Connect to channel number 'channel' at startup.
-n name
Send a '/n name' when connected. When -n is omitted the user's login name is used.
LINE EDITING COMMANDS
Ctrl-A Goto beginning of line.
Ctrl-B and Left arrow
Go one character backward.
Ctrl-D Delete character under cursor.
Ctrl-E Goto end of line.
Ctrl-F and Right arrow
Go one character forward.
Ctrl-K Kill from cursor to end of line (and store to kill buffer).
Ctrl-L Repaints the whole screen.
Ctrl-N and Down arrow
Scroll Down.
Ctrl-P and Up arrow
Scroll Up.
Ctrl-R Reprint current line.
Ctrl-U Delete current line in total.
Ctrl-W Erase last word.
Ctrl-Y Yank kill buffer.
The scroll buffer can be browsed with arrow keys Up and Down (or Ctrl-P and Ctrl-N), PageUp, PageDown, Home and End keys.
FILES
If ~/.conversrc exists, it is sent to the server after logging in. Handy for automatically sending commands like /notify, /who, etc.
SEE ALSO
/usr/share/doc/colrconv/README.colrconv.
AUTHOR
This manual page was written by Joop Stakenborg <pa3aba@debian.org>, for the Debian GNU/Linux system (but may be used by others).
COLRCONV(1)