echo(3cur)echo(3cur)Name
echo, noecho - enable/disable terminal echo
Syntax
int echo()
int noecho()
Description
The routine enables echoing of characters typed by the user. The routine disables echoing of characters typed by the user.
Initially, input characters are echoed. Subsequent calls to and do not flush typeahead.
Return Values
The and functions return OK on success and ERR on error.
echo(3cur)
Check Out this Related Man Page
getch(3cur)getch(3cur)Name
getch, mvgetch, mvwgetch, wgetch - read character
Syntax
#include <cursesX.h>
int getch()
int wgetch(win)
WINDOW *win;
int mvgetch(y, x)
int y, x;
int mvwgetch(win, y, x)
WINDOW *win;
int y, x;
Description
The routine reads a character from the terminal associated with the default window.
The routine reads a character from the terminal associated with the specified window.
The routine reads a character from the terminal associated with the default window at the specified position.
The routine reads a character from the terminal associated with the specified window at the specified position.
The following information applies to all the routines. In mode, if there is no input waiting, the integer is returned. In mode, the pro-
gram waits until the system passes text through to the program. Usually the program will restart after one character or after the first
newline, but this depends on how is set. The character will be echoed on the designated window unless has been set.
If is and a function key is pressed, the token for that function key is returned instead of the raw characters. Possible function keys are
defined in the header file with integers beginning with 0401. The function key names begin with KEY_. Function keys and their respective
integer values are described in the Guide to X/Open Curses Screen-Handling (R)
If a character is received that could be the beginning of a function key (such as escape), sets a timer. If the remainder of the sequence
does not come within the designated time, the character will be passed through, otherwise the function key value is returned. Conse-
quently, there may be a delay after a user presses the escape key before the escape is returned to the program.
Using the escape key for a single character function is discouraged.
The routines and are macros.
Return Values
Upon successful completion, the and functions return the character read.
If in delay mode and no data is available, ERR is returned.
See Alsocbreak(3cur), keypad(3cur), nodelay(3cur), noecho(3cur)
Guide to X/Open Curses Screen-Handling
getch(3cur)
I am having a problem with the following statement in a korn shell script:
if "$all_recs" = "ALL"; then
commands
fi;
I keep getting the error syntax error at line 999 : 'then' unmatched.
I'm sure it is a minor problem, but have been unable to find any answers online. Any help... (22 Replies)
does anyone know how to combine 2 lines? this is what im playing around with.
(filename: online, user name: prml0001, real name: primal)
#!/bin/sh
who | grep $1 > /dev/null
if
then
grep $1 /etc/passwd | cut -f 5, -d :
echo is logged on
exit 0
else
grep $1... (13 Replies)
Does anybody know what is wrong here. I am running centOS
the anticrash gives me this.
#!/bin/sh
while true
do
rm banme.tmp
:> banme.txt
/usr/sbin/tcpdump -p -c 100 -n -i eth0 "dst host 66.197.12 6.19 and udp port 7777" >banme.tmp
grep "length 0" banme.tmp | cut -f 3 -d " " |... (14 Replies)
Hi there,
I'd like to find a way to display a string and count the words in it.
supernova:~# echo 'hello world' | tee - | wc
Unfortunately, this doesn't work.
Any idea?
Thanks in advance.
Santiago (15 Replies)
Hi All,
Need help in resoving the issue . Can anyone let me know how to get fix length using unix shellscript.
For Ex: echo "NUMBER OF RECORDS "${NO_OF_ROWS}"\nFILE CREATION DATE&TIME "${PROD_DT}"
output should be :
NUMBER OF RECORDS 2546
CREATIN DATE&TIME 2009-12-01
Each... (14 Replies)
Hi,when I run my first shell script,I got something that doesn't work right.
I wrote this code in the script.
echo -e "Hello,World\a\n"But the screen print like this:
-e Hello,World
The "-e" wasn't supposed to be printed out.
Can anyone help me out?:wall:
Many thanks!:) (25 Replies)
Sorry folks, Second time today.
I am working on a script that accepts data via pipe and processes it.
I expect it to work as:
# command | ProcScript.sh
Within ProcScript.sh, I want to be able to give the target of the prev run command
I am using history 2 | grep -v history | awk... (18 Replies)
Hello,
'echo' command is not printing the exacting content as I needed.
I'm trying below, which is not echoing the correct content.
echo "XYZ\\`hostname`-volume" >> 123
# cat 123
XYZ
Where, It suppose to get
# cat 123
XYZ\hostname-volume
Please let me know how to resolve.
... (20 Replies)
Hello all!
I am on Mac (10.8.4) and my shell tcsh (man says version: Astron 6.17.00). Just to precise my tcsh:
echo $LC_CTYPE
UTF-8
I want to replace all ':' with a new line, to get all paths on one line. I don't find a way to make my shell accept the "\n"
My start was:
echo... (17 Replies)
I have a script that runs from this:
for i in * ; do (cd $i && echo $i && /test1/execute/testb);done
this is testb:
for file in `ls *.txt`
do
if && && && &&
&& ; then echo "NO"; break 1;
else
echo "it is there"
fi
done
What is happening is that I can get it to run a... (19 Replies)
Hi guys...
Sometime ago I said I was going to attempt an Android project.
I got my phone for XMAS and after installing a terminal program I realised how limited the command line is.
I do NOT intend to __root__ the phone at this point but I can read and write to certain folders.
The biggest... (14 Replies)
Hello,
I've been trying to find the answer to this with Google and trying to browse the forums, but I haven't been able to come up with anything. If this has already been answered, please link me to the thread as I can't find it.
I've been asked to write a script that pulls a list of our CPE... (51 Replies)
Hello
i have a file with this format:
ip.txt content:
192.168.1.1/2020
192.136.1.2/2028
192.168.1.10/3047
....
need to create 1000 files and each files content, import data from ip.txt line (first file with first line data, second file with second line...etc)
internal=yes
internalip=... (14 Replies)