Sponsored Content
Top Forums Shell Programming and Scripting For loop in ksh..Please help.. Post 302230378 by prashant43 on Friday 29th of August 2008 07:36:51 AM
Old 08-29-2008
Please help...Its urgent
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

ksh while loop

hi all, got this silly problem and i just can't seem to make sense of the error message its is saying 1400: cannot open. its my first time at writing a while loop but tried all sorts to get it working without success. #!usr/bin/ksh integer max=1400 set file="afilename" integer i=1 ... (3 Replies)
Discussion started by: scriptingmani
3 Replies

2. Shell Programming and Scripting

Help with While loop in KSH

Hi, I want to write a while loop like this can any one say me whats wrong with my loop USAGE="Usage: Mail.ksh" integer i=3 while ((1<i<=3)) do . . . . (( CMD_JUL = LSD_JUL - i )) CUR_MAINT_DATE=$(julian2date ${CMD_JUL}) . . . i=i-1 done (1 Reply)
Discussion started by: bhagya2340
1 Replies

3. Shell Programming and Scripting

Why does my for loop does not work right in ksh?

hi all, i have a for loop statement in my ksh code. it only returns the first value retrieved not the value for the other rows. ex: acct_id value = returned value in the for loop 1 = 1 2 = 1 (instead of 2) 3 = ... (1 Reply)
Discussion started by: ryukishin_17
1 Replies

4. Shell Programming and Scripting

ksh - for loop with variables

Hi, I 'm trying to send an e-mail for every different line in the .txt for i in {1..$variable} do sed -n "/$i$/p" text.txt done I have two problems about this. First one is that for loop doesn't work and the second one is that i cant get the output of sed (4 Replies)
Discussion started by: ozum
4 Replies

5. Shell Programming and Scripting

ksh loop

I need an echo "hit enter" running every 3 seconds till user hit enter key. 10x (1 Reply)
Discussion started by: LiorAmitai
1 Replies

6. Shell Programming and Scripting

ksh for loop

Any reason why this thing doesn't works in Korn Shell for (( expr1; expr2; expr3 )) do ..... ... repeat all statements between do and done until expr2 is TRUE Done Rgds, TS (4 Replies)
Discussion started by: targetshell
4 Replies

7. Shell Programming and Scripting

Output in for loop (ksh)

Hi , I'm writing the for loop script in home directory and wanted to get the files from /etc/data directory. #!/bin/ksh file_nm="/etc/dat" for test_data in $file_nm/fln* do echo "$test_data" done the code is executing successfully , but in the output it is showing ... (6 Replies)
Discussion started by: smile689
6 Replies

8. Shell Programming and Scripting

Help with loop in ksh script

Hi, I am new to UNIX. I am working on a script where it takes the input and produces a desired output and it works fine for one instance. Input(One Instance): CREATE TABLE TAB1 ( COL1, COL2 ); CREATE UNIQUE INDEX XPKTAB1 ( COL1 )TAB1; Output: CREATE TABLE TAB1 ( COL1, COL2... (8 Replies)
Discussion started by: varun2327
8 Replies

9. UNIX for Beginners Questions & Answers

Multiple if within while loop ksh

Hi All, I'm trying to write while loop with multiple if conditions. Each and every if condition with different variables. whenever one if condition fails i have remove the file from filename and have to pick another file and loop should exit until the last file found in filename. Please help... (4 Replies)
Discussion started by: Kayal
4 Replies

10. UNIX for Beginners Questions & Answers

Error with while loop ksh

while ];do first=${hat} echo "${first}" b=$((b+1)) a=$((a+5)) done I'm trying to append values from the indicated index of one array to other, but it gives me an error with while loop....suggesting that ....... In the hat array, it contains many values... (2 Replies)
Discussion started by: TestKing
2 Replies
t_rcv(3)						     Library Functions Manual							  t_rcv(3)

NAME
t_rcv() - receive data or expedited data sent over a connection SYNOPSIS
DESCRIPTION
The function receives either normal or expedited data. fd identifies the local transport endpoint through which data will arrive. buf points to a receive buffer where user data will be placed. nbytes specifies the size of the receive buffer. flags may be set on return from and specifies optional flags as described below. By default, operates in synchronous mode and will wait for data to arrive if none is currently available. However, if is set (via or will execute in asynchronous mode and will fail if no data is available. (See [TNODATA] below.) On return from the call, if is set in flags, this indicates that there is more data. Thus, the current transport service data unit (TSDU) or expedited transport service data unit (ETSDU) must be received in multiple calls. In the asynchronous mode, the flag may be set on return from the call even when the number of bytes received is less than the size of the receive buffer specified. Each with the flag set indicates that another must follow immediately to get more data for the current TSDU. The end of the TSDU is identified by the return of a call with the flag not set. If the transport provider does not support the concept of a TSDU as indicated in the info argument on return from or the flag is not meaningful and should be ignored. If nbytes is greater than zero on the call to will return 0 only if the end of a TSDU is being returned to the user. On return, the data returned is expedited data if is set in flags. If the number of bytes of expedited data exceeds nbytes, will set and on return from the initial call. Subsequent calls to retrieve the remaining ETSDU will have set on return. The end of the ETSDU is iden- tified by the return of a call with the flag not set. If expedited data arrives after part of a TSDU has been retrieved, receipt of the remainder of the TSDU will be suspended until the ETSDU has been processed. Only after the full ETSDU has been retrieved not set) will the remainder of the TSDU be available to the user. In synchronous mode, the only way for the user to be notified of the arrival of normal or expedited data is to issue this function or check for the or events using the function. XTI Internet Protocol-specific Information The flag should be ignored if normal data is delivered. If a byte in the data stream is pointed to by the TCP urgent pointer, as many bytes as possible preceding this marked byte and the marked byte itself are denoted as urgent data and are received with the flag set. If the buffer supplied by the user is too small to hold all urgent data, the flag will be set, indicating that urgent data still remains to be read. Note that the number of bytes received with the flag set is not necessarily equal to the number of bytes sent by the peer user with flag set. Fork Safety is not fork-safe. RETURN VALUE
Upon successful completion, returns the number of bytes received. Otherwise, it return -1 and is set to indicate the error. ERRORS
On failure, is set to one of the following: The specified identifier does not refer to a transport endpoint. was set, but no data is currently available from the transport provider. An asynchronous event has occurred on this transport endpoint and requires immediate attention. This function is not supported by the underlying transport provider. (XTI only) The function was issued in the wrong sequence on the endpoint referenced by fd. A system error has occurred during execution of this function. (XTI only) This error indicates that a communication problem has been detected between XTI and the transport provider for which there is no other suitable XTI ( SEE ALSO
fcntl(2), t_getinfo(3), t_look(3), t_open(3), t_snd(3), thread_safety(5). STANDARDS CONFORMANCE
t_rcv(3)
All times are GMT -4. The time now is 07:36 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy