Sponsored Content
Top Forums Shell Programming and Scripting Function Bug in script - need help Post 302120199 by gzs553 on Tuesday 5th of June 2007 01:35:34 AM
Old 06-05-2007
Gosh...sometimes I am so dense...Thanks for your help!! I guess I have been looking at it too long....duh!! Smilie
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Can anyone find a bug in this code?? shell script

I have done a script and IT WORKS JUST PERFECT from command line...but in cron it has problems executing... nawk -F"|" ' { s=substr($104,2,18)} {b ++s} END { for (i in b) print i, b } ' $1 > /path/to/files/TranId_w$2 q=`cat /path/to/files/TranId_w$2 | wc -l` echo $q >... (1 Reply)
Discussion started by: amon
1 Replies

2. Shell Programming and Scripting

bash-function with array acting bizarre, bug?

Hello, basically what this script is supposed to do is showing a list of hosts that is given a number, that you will be able to choose from a list. A check is made to verify that the chosen number is within the array and this is where things go bad and I don't know why, bizarre. I've spent... (5 Replies)
Discussion started by: gand
5 Replies

3. Shell Programming and Scripting

Help - Bug: A script to compile two types of data files into two temporary files

Dear other forum members, I'm writing a script for my homework, but I'm scratching all over my head and still can't figure out what I did wrong. Please help me. I just started to learn about bash scripting, and I appreciate if anyone of you can point out my errors. I thank you in advance. ... (3 Replies)
Discussion started by: ilove2smoke
3 Replies

4. Shell Programming and Scripting

SHELL SCRIPT Function Calling Another Function Please Help...

This is my function which is creating three variables based on counter & writing these variable to database by calling another function writeRecord but only one record is getting wrote in DB.... Please advise ASAP...:confused: function InsertFtg { FTGSTR="" echo "Saurabh is GREAT $#" let... (2 Replies)
Discussion started by: omkar.sonawane
2 Replies

5. Shell Programming and Scripting

Bug in Function Call

Can anybody tell me where is the bug in this below mentioned function call. #The String Search File myString="${LOCATION}/config/stringFile.txt" # Functional Usage function usage() { if ; then echo "************************************************************" ... (5 Replies)
Discussion started by: baraghun
5 Replies

6. Shell Programming and Scripting

Sort function UNIX bug ???

Hello there i have a funny behiavor of the sort fonction, i try it out on different Solaris machine and i have the same issue. So i would like to see if there is a rationel explanation here is some data in a file:test.txt ,Test,RSD,RSD_Asset ,Test,RSD,RSD_Credit ,Test,RSD,RSD_Liab... (3 Replies)
Discussion started by: kykyboss
3 Replies

7. Programming

Tweaked getpass() function gives an untraceable bug

I have customized the getpass() as follows: char* my_getpass(const char* str) { struct termios oflags, nflags; static char passwd; /* disabling echo */ tcgetattr(fileno(stdin), &oflags); nflags = oflags; nflags.c_lflag &= ~ECHO; nflags.c_lflag |= ECHONL; ... (3 Replies)
Discussion started by: royalibrahim
3 Replies

8. Shell Programming and Scripting

Will files, creaetd in one function of the same script will be recognized in another function?

Dear All. I have a script, which process files one by one. In the script I have two functions. one sftp files to different server the other from existing file create file with different name. My question is: Will sftp function recognize files names , which are created in another... (1 Reply)
Discussion started by: digioleg54
1 Replies

9. What is on Your Mind?

Small bug in the Quick Editor function in postbit

Hey, There was a small bug in the Quick Editor function in postbit, but I fixed it (basically a double quote was missing from an element id): <div id="post_message_$post" class="neo-message-area">$post</div> Was <div id="post_message_$post class="neo-message-area">$post</div> Should... (1 Reply)
Discussion started by: Neo
1 Replies
stcu(3) 						     Library Functions Manual							   stcu(3)

Name
       stcu,  st_cuinit,  st_setchdr,  st_currentpchdr,  st_free,  st_extadd, st_pext_iext, st_pext_rndx, st_iextmax, st_extstradd, st_str_extiss,
       st_idn_index_fext, st_idn_rndx, st_pdn_idn, st_rndx_idn, st_setidn - routines that provide a compilation unit symbol table interface

Syntax
       #include <syms.h>

       pCHDRR st_cuinit ()

       void st_setchdr (pchdr)
       pCHDRR	 pchdr;

       pCHDRR st_currentpchdr()

       void st_free()

       long st_extadd (iss, value, st, sc, index)
       long iss;
       long value;
       long st;
       long sc;
       long index;

       pEXTR st_pext_iext (iext)
       long iext;

       pEXTR st_pext_rndx (rndx)
       RNDXR rndx;

       long st_iextmax()

       long st_extstradd (str)
       char *str;

       char *st_str_extiss (iss)
       long iss;

       long st_idn_index_fext (index, fext)
       long index;
       long fext;

       long st_idn_rndx (rndx)
       RNDXR rndx;

       pRNDXR st_pdn_idn (idn)
       long idn;
       RNDXR st_rndx_idn (idn)
       long idn;

       void st_setidn (idndest, idnsrc)
       long idndest;
       long idnsrc;

Description
       The stcu routines provide an interface to objects that occur once per object, rather than once per file descriptor (for	example,  external
       symbols,  strings, and dense numbers).  The routines provide access to the current chdr (compile time hdr), which represents the symbol ta-
       ble in running processes with pointers to symbol table sections rather than indices and offsets used in the disk file representation.

       A new symbol table can be created with st_cuinit.  This routine creates and initializes a CHDRR (see cmplrs/stsupport.h).  The CHDRR is the
       current	chdr  and  is  used  in  all  later calls.  A chdr can also be created with the read routines (see The st_cuinit routine returns a
       pointer to the new CHDRR record.

       st_currentchdr Returns a pointer the current chdr.

       st_setchdr     Sets the current chdr to the pchdr argument and sets the per file structures to reflect a change in symbol tables.

       st_free	      Frees all constituent structures associated with the current chdr.

       st_extadd      Lets you add to the externals table. It returns the index to the new external for future reference and use.  The	ifd  field
		      for the external is filled in by the current file (see For more details on the parameters, see sym.h.

       st_pext_iext and st_pext_rndx
		      Returns  pointers  to  the  external, given a index referencing them. The latter routine requires a relative index where the
		      index field should be the index in external symbols and the rfd field should be the constant ST_EXTIFD. NOTE: The  externals
		      contain the same structure as symbols (see the SYMR and EXTR definitions).

       st_iextmax     Returns the current number of entries in the external symbol table.

       The iss field in external symbols (the index into string space) must point into external string space.

       st_extstradd   Adds a null-terminated string to the external string space and returns its index.

       st_str_extiss  Converts that index into a pointer to the external string.

       The  dense number table provides a convenience to the code optimizer, generator, and assembler. This table lets them reference symbols from
       different files and externals with unique densely packed numbers.

       st_idn_index_fext
		      Returns a new dense number table index, given an index into the symbol table of the current file (or if  fext  is  set,  the
		      externals table).

       st_idn_rndx    Returns  a  new dense number, but expects a RNDXR (see sym.h to specify both the file index and the symbol index rather than
		      implying the file index from the current file.  The RNDXR contains two fields: an index into the externals table and a  file
		      index rsyms can point into the symbol table, as well). The file index is ST_EXTIFD (see stsupport.h) for externals.

       st_rndx_idn    Returns a RNDX, given an index into the dense number table.

       st_pdn_idn     Returns a pointer to the RNDXR index by the idn argument.

See Also
       stfe(3), stfd(3)

								       RISC								   stcu(3)
All times are GMT -4. The time now is 06:59 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy