Sponsored Content
Full Discussion: problem with while loop
Top Forums Programming problem with while loop Post 92433 by Perderabo on Sunday 11th of December 2005 10:44:07 AM
Old 12-11-2005
You did not just type an "a". You typed an "a" followed by a newline character. Try typing "unix" and watch what happens. This is one of several reason why I do not like scanf. What is worse here, you do not need scanf for anything. I would define a character array called inputline to be 80 characters. Then I would use fgets (never use gets) to read a line of input. Finally just "proceed=inputline[0]" to get the first character and discard the rest of the line.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

for loop problem

Hi, I have a directory called logs in which i have the log files. i have to touch the file before deleting it. i am doing like this filestodelete="*.log* *log*" for files in $filestodelete do touch $files $files.$(date +%a) rm -f $filestodelete done touch is not working... (5 Replies)
Discussion started by: namishtiwari
5 Replies

2. UNIX for Advanced & Expert Users

loop problem

Hi guys my while do loop is not working properly; As soon as the load_date and run_date is same it should stop can somebody tell me where I am having the problem? In an oracle table I have LOAD_DT=5/1/2009 DATE datatype RUN_DT=5/5/2009 DATE datatype Now in a script with a spool file I get the... (15 Replies)
Discussion started by: henrysmith
15 Replies

3. Shell Programming and Scripting

Problem in While loop

Hi Guys, This is my code.. I am getting an error in the inside while statement when comparing.. I am not able to figure it out.. Pls help me... while read value fatherid son_id top_id r_type do inside_value=1; echo $inside_value; echo $r_type; while do echo... (6 Replies)
Discussion started by: mac4rfree
6 Replies

4. Shell Programming and Scripting

problem with a loop

Hi What is wrong with this loop it was taken has a example in book!!! it returns then /usr/sbin/svcadm disable ppserv else /usr/sbin/ppadmin stop fi } (3 Replies)
Discussion started by: Ex-Capsa
3 Replies

5. Shell Programming and Scripting

problem with while loop

hi I had created a while loop in a script file called whiletest.sh as follows as follows: count=0 max=10 while do echo $count echo count=$(count+1)" " done echo "value of count:$count" then i run the script with the command sh whilestest.sh but its giving me an error... (5 Replies)
Discussion started by: angel12345
5 Replies

6. UNIX for Dummies Questions & Answers

While loop problem

I have a while loop with -f and -o option.Can any one please tell me what that stands for?The Sample code is as follows:- while do ## some processing done (10 Replies)
Discussion started by: Param0073
10 Replies

7. Shell Programming and Scripting

Problem with While loop.

Hi Script Gurus, I am facing issue with while loop in bash. The while loop is running as end less loop even after given criteria does not meet. STATE_BEFORE_SPLIT () { for clone in $Clonegroups; do state=$( $Navicmd -listclone -name $clone -cloneid $Cloneid |awk... (3 Replies)
Discussion started by: RobP
3 Replies

8. Shell Programming and Scripting

Problem with loop within loop

Hi, I work on Ab-initio ETL tool which is based on Unix. I made a small script which has two loop's one with in another. All the functionality is working for the first line of outer loop but when it comes to other lines of outer loop it is throwing error as command not found. Below is the... (4 Replies)
Discussion started by: Ravindra Swan
4 Replies

9. Shell Programming and Scripting

Problem with While Do loop

I am trying to do a while do loop that asks for a password and returns if the password entered is incorrect. I have that part working however i want to modify it so that if a similar word is entered it will read "that is close but incorrect" and i cannot seem to get it working, being new in the... (6 Replies)
Discussion started by: lm5522
6 Replies

10. Shell Programming and Scripting

Problem with loop

Hi all, a problem with a loop. Imagine it starts with var1="$(cat txtif.out )"while do echo file1 echo file2 echo y > txtif.out if then break fi done exit 0 the problem is that if the file is changing during the loop seems to continue as it reads "x" state,... (5 Replies)
Discussion started by: Board27
5 Replies
sasl_client_step(3SASL) 		      Simple Authentication Security Layer Library Functions			   sasl_client_step(3SASL)

NAME
sasl_client_step - acquire an auxiliary property context SYNOPSIS
cc [ flag ... ] file ... -lsasl [ library ... ] #include <sasl/sasl.h> int sasl_client_step(sasl_conn_t *conn, const char *serverin, unsigned serverinlen, sasl_interact_t **prompt_need, const char **clientout, unsigned *clientoutlen); DESCRIPTION
Use the sasl_client_step() interface performs a step in the authentication negotiation. sasl_client_step() returns SASL_OK if the complete negotiation is successful. If the negotiation on step is completed successfuly, but at least one more step is required, sasl_client_step() returns SASL_CONTINUE. A client should not assume an authentication negotiaion is successful because the server signaled success through the protocol. For example, if the server signaled OK Authentication succeeded in IMAP, sasl_client_step() should be called one more time with a serverinlen of zero. If a call to sasl_client_step() returns SASL_INTERACT, the library requires some values before sasl_client_step() can proceed. The prompt_need structure will be filled with the requests. The application should fulfull these requests and call sasl_client_step() again with identical parameters. The prompt_need parameter will be the same pointer as before, but it will have been filled in by the applica- tion. PARAMETERS
conn The SASL connection context. serverin The data given by the server. The data is decoded if the protocol encodes requests sent over the wire. serverinlen The length of the serverin. clientout clientout and clientoutlen are created. They contain the initial client response to send to the server. It is the clientoutlen job of the client to send them over the network to the server. Any protocol specific encodingthat is necessary, for example base64 encoding, must be done by the client. prompt_need A list of prompts that are needed to continue, if necessary. RETURN VALUES
sasl_client_step() returns an integer that corresponds to a SASL error code. ERRORS
SASL_OK The call to sasl_client_start() was successful. Authentication is complete. SASL_CONTINUE The call to sasl_client_start() was successful, but at least one more step is required for authentication. SASL_INTERACT The library requires some values before sasl_client_step() can proceed. All other error codes indicate an error situation that must be handled, or the authentication session should be quit. See sasl_errors(3SASL) for information on SASL error codes. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWlibsasl | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+ |MT-Level |Safe | +-----------------------------+-----------------------------+ SEE ALSO
sasl_errors(3SASL), attributes(5) SunOS 5.10 28 Aug 2003 sasl_client_step(3SASL)
All times are GMT -4. The time now is 12:57 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy