Hi guys...was trying to use while loop and a sentry to prompt user input again if an invalid option was entered...but somehow I got a "while" unmatched error...The code is as below:
Thanks in advance...
Last edited by Ryuinferno; 11-18-2012 at 11:54 PM..
Every night I recieve this message:
Verify Report - Broken/missing symbolic links
File With Discrepancies : 213
Total Discrepancies : 213
Can anyone explain what this is and how I can resolve it?
Thanks,
DJ At Work (4 Replies)
While attempting to use ftp to retrieve a file from a remote server (running SCO Unix 5.0.2), it eventually returns a timeout error with the following message - netin: connection reset by peer.
I can't find any reference to this error. Has anyone encountered it before, or know what causes it? (3 Replies)
hi all,
i've got a script that takes in what a user enters (multiple entries) and then joins them all together and appends this to a file. what i want to happen now is the terminal should display "record saved" if the save to the file is successful, if it isn't just display the standard unix... (2 Replies)
What does the following mean:
state_field state_abvr = {
"AL","ALABAMA",
"AK","ALASKA",
.
.
.
};
extern state_field state_abvr;
issues we
I am facing following compilation issue
bosdf9d1:root make
CC -I/bto/bcs/shared/include -I/bto/sys/BCS/usr/include ... (1 Reply)
I used set -n FS.sh to check for syntax errors. No problems. I run the script with set -x and set -v with the following error:
find: bad option ;
find: path-list predicate-list
Reviewing the verbose output everything is read correctly. The files transfer and the script completes. I can't seem... (4 Replies)
I have an HP NetServer LH3 which is exhibiting an error during the boot process. I am getting the following messages, none of which I've seen before
1. WARNING: SCSI adapter: Cannot install intr vecno=12 type=4 IPL=5 Vector 12 is private
2. WARNING: "TEST_UNIT_READY" Command timed 11 seconds... (0 Replies)
Hello, the following is generating a error at the line "tmprintf(&tmBundle, _TMC("{0}"),Prompt);"... a bit lost as I am diving into this debug...
Thank you in advance...
int H_YesNo(TMCHAR *Prompt, int DefVal)
{
TMCHAR YesNo = '\0';
tmprintf(&tmBundle, _TMC("{0}"),Prompt);
while... (3 Replies)
Hello All,
Below is the control card or the file which i am using in shell script to mget files from remote machine via FTP.
bash-3.00$ cat ftp_ALD_DAC.log
open 10.xx.yy.zzz
user D00000187 nb8tr4xx2u
ascii
cd prod/out
lcd /Internal_Impact_TT_Input
mget ALD*.TXT
bye
Below is the... (0 Replies)
Hi gurus,
I have a question, need some of your inputs...
I have a command like this :
export LINE_COUNT=`wc -l test.dat | awk '{print $1}'`
echo $LINE_COUNT --- > gives me 2 which is fine as the file has 2 lines.
This works fine if the file test.dat is present but in case... (3 Replies)
first of all.. sorry about all the question bombing.. im bored atm so im currently playing around with sh scripting hehe
s = `expr ls -s Documents | grep Music | awk '{ print $1 }' `
t = `expr $t + $s`
it give syntax error
s not found
t not found lol...
any idea why? (7 Replies)
Discussion started by: Nick1097
7 Replies
LEARN ABOUT PHP
readline_callback_handler_install
READLINE_CALLBACK_HANDLER_INSTALL(3) 1 READLINE_CALLBACK_HANDLER_INSTALL(3)readline_callback_handler_install - Initializes the readline callback interface and terminal, prints the prompt and returns immediatelySYNOPSIS
bool readline_callback_handler_install (string $prompt, callable $callback)
DESCRIPTION
Sets up a readline callback interface then prints $prompt and immediately returns. Calling this function twice without removing the previ-
ous callback interface will automatically and conveniently overwrite the old interface.
The callback feature is useful when combined with stream_select(3) as it allows interleaving of IO and user input, unlike readline(3).
PARAMETERS
o $prompt
- The prompt message.
o $callback
- The $callback function takes one parameter; the user input returned.
RETURN VALUES
Returns TRUE on success or FALSE on failure.
Example #1
Readline Callback Interface Example
<?php
function rl_callback($ret)
{
global $c, $prompting;
echo "You entered: $ret
";
$c++;
if ($c > 10) {
$prompting = false;
readline_callback_handler_remove();
} else {
readline_callback_handler_install("[$c] Enter something: ", 'rl_callback');
}
}
$c = 1;
$prompting = true;
readline_callback_handler_install("[$c] Enter something: ", 'rl_callback');
while ($prompting) {
$w = NULL;
$e = NULL;
$n = stream_select($r = array(STDIN), $w, $e, null);
if ($n && in_array(STDIN, $r)) {
// read a character, will call the callback when a newline is entered
readline_callback_read_char();
}
}
echo "Prompting disabled. All done.
";
?>
readline_callback_handler_remove(3), readline_callback_read_char(3), stream_select(3).
PHP Documentation Group READLINE_CALLBACK_HANDLER_INSTALL(3)