11-27-2001
reading from input
Hi guys ,
As you know normally ' read ' statement waits
for the user to press enter and then terminates
the input .............
Can anyone of u tell me how do i read a
single character from input without waiting
for the user to press enter ................
Thanks,
Nagesh.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
#!/usr/bin/sh
echo "Enter reason:"
echo "> \c"
read $reason
$reason >> access.log
This doesnt work for me. Can someone tell me how I would read the input from what the person types, and then append that to the log file?
Regards (2 Replies)
Discussion started by: alwayslearningunix
2 Replies
2. Shell Programming and Scripting
how do we read input from a user
e.g i want to ask a user to enter 6 sets of numbers
how do i control information from the user?
i have this.......
#!/bin/bash
echo "Please enter six numbers"
read number
echo $number >> file1
but this stops after the first number..how can i... (2 Replies)
Discussion started by: vadharah
2 Replies
3. Shell Programming and Scripting
I am trying to read input for a C program (that expects input from the user) from a file using the shell command:
progname < filename
but it seems that the program considers the char '<'
as the first input, hence causing an "error" in my program.
I checked it with another program and it... (2 Replies)
Discussion started by: nadbar
2 Replies
4. Shell Programming and Scripting
Hi guys,
I am new to AWK and unix scripting. Please see below my problem and let me know if anyone you can help.
I have 2 input files (example given below)
Input file 2 is a standard file (it will not change) and we have to get the name (second column after comma) from it and append it... (5 Replies)
Discussion started by: sksahu
5 Replies
5. Shell Programming and Scripting
Okay, so I've looked on here and found some similar things, but not exactly what I am looking for. I am working on creating a script that can back up some files, based on the contents of another file - the configuration file.
First file contains the files to back up - we'll call this... (1 Reply)
Discussion started by: pdxwarrior
1 Replies
6. Shell Programming and Scripting
I am trying to edit a file in shell script using sed. I need to get the input from command line
suppose
script.sh
sed"/s place=/place=california/g" > /root/user/mark.txt
echo " place changed "
the above code searches for string place in the file mark.txt and replaces with place=... (5 Replies)
Discussion started by: sriki32
5 Replies
7. Shell Programming and Scripting
Hello,
I am new to scripting.
How do I read multiple lines from the command line?
I know read reads one line, but if I have to read multiple lines, how should I do?
Thanks,
Prasanna (4 Replies)
Discussion started by: prasanna1157
4 Replies
8. Shell Programming and Scripting
So, I am new to shell scripting and have a few problems.
I know how to read from standard input but I do not know how to really compare it to say, a character. I am trying to compare it to a character and anything exceeding just a character, the user will get an output message, but the program... (7 Replies)
Discussion started by: Bungkai
7 Replies
9. Shell Programming and Scripting
I've always written scripts where the user executes the script and I prompt them for what they want to do.
But I'm trying to write a script where root executes the script 'lock' or its hard-link 'unlock' and the script will passwd -l or passwd -u an account depending on the choice.
What would... (3 Replies)
Discussion started by: ADay2Long
3 Replies
10. Shell Programming and Scripting
echo "Enter the Value : "
read value
sed '1s:\(.\{6\}\)\(.\{4\}\):\1'$value':' flextran$RUN_DATE-completed.txt > temp.txt
mv temp.txt flextran$RUN_DATE-completed.txt
on the run time after entering the input value it waits for keystroke and the values is not input to the function
The output... (4 Replies)
Discussion started by: rammm
4 Replies
LEARN ABOUT DEBIAN
cst_end
CSTARTEND(7) Miscellaneous Information Manual CSTARTEND(7)
NAME
cstartend - cWnn Startup and Termination
DESCRIPTION
1. Startup of cserver
~~~~~~~~~~~~~~~~~~
To start up cWnn, first, you need to start the cserver. Type the following command at the C Shell prompt:
% cserver <CR>
The default path of cserver is "/usr/local/bin/cWnn4/". If the user has not set this path, he can either set it and type the com-
mand directly, or type the full pathname of cserver while executing this command.
cserver will only be started up once. You may confirm the existence of cserver by using the "cwnnstat" command.
2. Startup of client module, cuum
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
After starting cserver, the cWnn client module "cuum" may be started up.
To start "cuum", type the following command at the C Shell prompt of a Chinese window:
% cuum <CR>
To activate other input environments, you may use the "-r" option of the "cuum" command together with the default path of that envi-
ronment. For example, to activate Pinyin input environment, do the following:
% cuum -r /usr/local/lib/wnn/zh_CN/rk_p <CR>
The default path for "cuum" is
"/usr/local/bin/cWnn4/". Many cuum's may be started at the same time on different windows. Each of them will be registered as a
client at the cserver.
After a startup message, the client module, cuum, is ready to be used. To enter the input mode, press ^.
To leave the input mode, press ^ again.
To confirm the existence of cuum, you may also use ^.
3. Termination of cuum
~~~~~~~~~~~~~~~~~~~~
In order to terminate a client process, press ^D.
The cserver will save all the usage frequency files and dictionaries of the particular client and terminate the connection between
itself and that client.
4. Termination of cserver
~~~~~~~~~~~~~~~~~~~~~~
To terminate the cserver, type the following command:
% cwnnkill <CR>
If some other clients still exist, a message will be displayed. In this case, you have to termiante all other client modules before
you can terminate the cserver.
NOTE
1. For details, refer to cWnn Manual Ver.4.1, Chapter 2.
13 May 1992 CSTARTEND(7)