Sponsored Content
Top Forums Shell Programming and Scripting How to define array in Bourne shell , csh & ksh Post 302238492 by learnbash on Saturday 20th of September 2008 10:26:03 AM
Old 09-20-2008
what u want exactly tell me i'll try my best to do, explain your problem in detail, so i can understand it.

Thanks
Bash
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Exactly How can we define "sh ksh csh &bash"

Hi - I m prashant. I m new in UNIX&LINUX world. I want to ask that how can we define the shell in Linux like bash,ksh,csh in Linux. What is the use of these shells. I know there are mny experts on net if you can tell me then please do me this favour and tell me about this topic. ... (1 Reply)
Discussion started by: prashantsingh
1 Replies

2. Shell Programming and Scripting

C shell & Bourne Shell

Hi Guys, My first post and simple one at that .. Really rusty with this shell scripting..\ I have a script called .. j.sh I am calling > j.sh LOG_PATH $BLMBRGDATA/blmbrg.properties where j.sh is grep $1 $2 | cut -d',' -f2 . $BLMBRGDATA is set to a directory path. why do i get :- $... (3 Replies)
Discussion started by: jsm66
3 Replies

3. Shell Programming and Scripting

how to log if the program contains both bourne-shell & pearl scripts

I have a program (say, MyProgram) written in Bourne-shell script, but at some point it calls another script written in pearl, as illustrated below: #!/bin/sh ..... case $x in 1) ConfigSystem1 ( b-shell script) 2) ConfigSystem2 ( pl) 3) ConfigSystem3 (b-shell) .... Then I create... (0 Replies)
Discussion started by: bluemoon1
0 Replies

4. Shell Programming and Scripting

calling csh script from ksh shell

hi, I have a csh script, which has setenv X xyz etc My shell is korn Is there some way I can "source" this to have the variables in my current korn shell? thanks (3 Replies)
Discussion started by: JamesByars
3 Replies

5. Shell Programming and Scripting

ksh equivalent to >& in csh

In csh I am using >&. What is the equivalent in ksh?? >& - redirect stdout and stderr (csh,tcsh) (18 Replies)
Discussion started by: kristinu
18 Replies

6. Shell Programming and Scripting

Array in Ksh Shell script

hi team, i have a file, which contains only variable and its value param.ksh --------- export A=123 export B=345 export C=567 export D=OPLI export E=OL89PO From shell script, i am invoking this file and use the value of this variable. Now there are 5 variable in above file. Before i... (1 Reply)
Discussion started by: ace_friends22
1 Replies

7. Shell Programming and Scripting

Bourne shell & Korn shell

Could some one tell me the difference btw Bourne shell and the Kshell? Which is more flexible and reliable in terms of portability and efficiency. When i type the following command .. $ echo $SHELL yields me /bin/sh Does this tells me that I am in Bourne shell. If yes, how can i get... (6 Replies)
Discussion started by: bobby1015
6 Replies

8. Shell Programming and Scripting

Loop to define variables in KSH

Hi, I am trying to use a database to store configurations in an environment definition scripts to make the configurations easily modifiable. (long story short - it is an easier process to make changes in the db than trying to deploy a file). The values will be stored in the database in the... (1 Reply)
Discussion started by: gbala
1 Replies

9. Shell Programming and Scripting

How to append to array within conditional block in ksh/korn shell?

Hi, I have one array created and some values are there in ksh. I want to append some other values to it based on some condition in if statement. #!/bin/ksh echo "---------------------------------------------------" set -A ipaddr_arr $(egrep -v '^#|^::|^$' /etc/hosts |awk '{print $1}'... (2 Replies)
Discussion started by: sanzee007
2 Replies

10. Shell Programming and Scripting

Pass C shell array to another C shell script(csh) and shell(sh)

Dear Friends, Please help me on this my script name is send.csh In this i have written the statement like this set args = ( city state country price ) I want to pass this array to another c shell called receiver.csh. and i want to use it in this c shell or how to pass to... (2 Replies)
Discussion started by: SA_Palani
2 Replies
explain_ferror(3)					     Library Functions Manual						 explain_ferror(3)

NAME
explain_ferror - explain ferror(3) errors SYNOPSIS
#include <libexplain/ferror.h> const char *explain_ferror(FILE *fp); const char *explain_errno_ferror(int errnum, FILE *fp); void explain_message_ferror(char *message, int message_size, FILE *fp); void explain_message_errno_ferror(char *message, int message_size, int errnum, FILE *fp); DESCRIPTION
These functions may be used to obtain explanations for errors returned by the ferror(3) system call. explain_ferror const char *explain_ferror(FILE *fp); The explain_ferror function is used to obtain an explanation of an error returned by the ferror(3) system call. The least the message will contain is the value of strerror(errno), but usually it will do much better, and indicate the underlying cause in more detail. The errno global variable will be used to obtain the error value to be decoded. This function is intended to be used in a fashion similar to the following example: if (ferror(fp) < 0) { fprintf(stderr, "%s ", explain_ferror(fp)); exit(EXIT_FAILURE); } It is essential that this function cal be placed as close as possible to the I/O code that has caused the problem, otherwise intervening code could have altered the errno global variable. fp The original fp, exactly as passed to the ferror(3) system call. Returns: The message explaining the error. This message buffer is shared by all libexplain functions which do not supply a buffer in their argument list. This will be overwritten by the next call to any libexplain function which shares this buffer, including other threads. Note: This function is not thread safe, because it shares a return buffer across all threads, and many other functions in this library. explain_errno_ferror const char *explain_errno_ferror(int errnum, FILE *fp); The explain_errno_ferror function is used to obtain an explanation of an error returned by the ferror(3) system call. The least the mes- sage will contain is the value of strerror(errnum), but usually it will do much better, and indicate the underlying cause in more detail. This function is intended to be used in a fashion similar to the following example: if (ferror(fp) < 0) { int err = errno; fprintf(stderr, "%s ", explain_errno_ferror(err, fp)); exit(EXIT_FAILURE); } It is essential that this function cal be placed as close as possible to the I/O code that has caused the problem, otherwise intervening code could have altered the errno global variable. errnum The error value to be decoded, usually obtained from the errno global variable just before this function is called. This is neces- sary if you need to call any code between the system call to be explained and this function, because many libc functions will alter the value of errno. fp The original fp, exactly as passed to the ferror(3) system call. Returns: The message explaining the error. This message buffer is shared by all libexplain functions which do not supply a buffer in their argument list. This will be overwritten by the next call to any libexplain function which shares this buffer, including other threads. Note: This function is not thread safe, because it shares a return buffer across all threads, and many other functions in this library. explain_message_ferror void explain_message_ferror(char *message, int message_size, FILE *fp); The explain_message_ferror function may be used to obtain an explanation of an error returned by the ferror(3) system call. The least the message will contain is the value of strerror(errno), but usually it will do much better, and indicate the underlying cause in more detail. The errno global variable will be used to obtain the error value to be decoded. This function is intended to be used in a fashion similar to the following example: if (ferror(fp) < 0) { char message[3000]; explain_message_ferror(message, sizeof(message), fp); fprintf(stderr, "%s ", message); exit(EXIT_FAILURE); } It is essential that this function cal be placed as close as possible to the I/O code that has caused the problem, otherwise intervening code could have altered the errno global variable. message The location in which to store the returned message. If a suitable message return buffer is supplied, this function is thread safe. message_size The size in bytes of the location in which to store the returned message. fp The original fp, exactly as passed to the ferror(3) system call. explain_message_errno_ferror void explain_message_errno_ferror(char *message, int message_size, int errnum, FILE *fp); The explain_message_errno_ferror function may be used to obtain an explanation of an error returned by the ferror(3) system call. The least the message will contain is the value of strerror(errnum), but usually it will do much better, and indicate the underlying cause in more detail. This function is intended to be used in a fashion similar to the following example: if (ferror(fp) < 0) { int err = errno; char message[3000]; explain_message_errno_ferror(message, sizeof(message), err, fp); fprintf(stderr, "%s ", message); exit(EXIT_FAILURE); } It is essential that this function cal be placed as close as possible to the I/O code that has caused the problem, otherwise intervening code could have altered the errno global variable. message The location in which to store the returned message. If a suitable message return buffer is supplied, this function is thread safe. message_size The size in bytes of the location in which to store the returned message. errnum The error value to be decoded, usually obtained from the errno global variable just before this function is called. This is neces- sary if you need to call any code between the system call to be explained and this function, because many libc functions will alter the value of errno. fp The original fp, exactly as passed to the ferror(3) system call. SEE ALSO
ferror(3) check stream status explain_ferror_or_die(3) check stream status and report errors COPYRIGHT
libexplain version 0.52 Copyright (C) 2008 Peter Miller explain_ferror(3)
All times are GMT -4. The time now is 07:34 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy