Sponsored Content
Top Forums Programming Capturing a ret val of C obj file in ksh script Post 302073608 by grumpf on Tuesday 16th of May 2006 07:20:18 AM
Old 05-16-2006
The exit code mechanism is working basicly since main() is int. What you see on shell is the return
code of main() (using void main() is therefore a BAD idea).
A string is something different. The easy way retvar=$( myprg ) works only IFF there is no
other output.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

ret val of a command in a pipe which is NOT the last one

hello dear UNIX gurus ;-) my problem is one of those i would think that many others should also have had it in the past. but i cannot find any thread or other documentation about it. inside a ksh script i have a pipe like this: ksh -c "export LIBPATH=$LD_LIBRARY_PATH; ${Cmd} ${Param} 2>&1... (5 Replies)
Discussion started by: latze
5 Replies

2. Shell Programming and Scripting

Need help capturing pipe to a file in shell script

The command: echo "this is some text" | shellscript abc def ghi My problem: How to capture "this is some text" so that I can process it, I.e. capture to a file. What I'm attemting to do is process the text echo'd into a file after writing the parameters passed first. No problem... (6 Replies)
Discussion started by: heinz
6 Replies

3. Shell Programming and Scripting

capturing line from script output and appending to a file

Hi all, I did some searching in this forum but can't find anything that matches the issue I'm bumping heads with. On a CentOS4/Postfix (and bash everywhere) mail gateway box I run a command periodically to purge the Postfix queue of messages "From:MAILER-DAEMON". This is the one line'r... (6 Replies)
Discussion started by: wally_welder
6 Replies

4. UNIX for Dummies Questions & Answers

make command failed for target 'obj/gp_unix.o'

hi, i am trying to run make command in solaris 9. its giving the error: make:Fatal error:Command failed for target 'obj/gp_unix.o' i came to know X11 should be inastalled for gp_unix.o.But it is already installed.still the same error. ./configure worked fine. can anybody please suggest... (3 Replies)
Discussion started by: rosalina
3 Replies

5. Shell Programming and Scripting

KSH script to run other ksh scripts and output it to a file and/or email

Hi I am new to this Scripting process and would like to know How can i write a ksh script that will call other ksh scripts and write the output to a file and/or email. For example ------- Script ABC ------- a.ksh b.ksh c.ksh I need to call all three scripts execute them and... (2 Replies)
Discussion started by: pacifican
2 Replies

6. Shell Programming and Scripting

Capturing stderr in ksh script within a script

I have seen lots of entries on stderr and stdout, but I did not see a solution to my question. In running a script, I call another script. I want to capture output and error messages from the called script. I am able to redirect the stdout from the called script to my output file, but I don't... (2 Replies)
Discussion started by: timtoben
2 Replies

7. Shell Programming and Scripting

Use of "@ ret =" in sh script

I've been thrown into debugging a sh script and have run into an unfamiliar bit of code. In part the code is: set ret = 1 set roop = 0 while( $ret == 1 ) @ ret = `rcp chPhase.dat.default "$remoteUser@$ENGINE_HOST\:/gp/tune/chPhase.dat"$remoteUser@$ENGINE_HOST\:/gp/tune/chPhase.dat`... (3 Replies)
Discussion started by: Stmpjmp
3 Replies

8. Solaris

SunONE (webserver7) obj.conf

Hello all, I'm configuring the webserver and I need to add some parameters to be logged, so I don't know if I'm doing it right, please advice. Here's my obj.conf: # # Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # You can edit this... (0 Replies)
Discussion started by: TorvusBog
0 Replies

9. Shell Programming and Scripting

Capture a database val and use in script

Hello, sorry if this has been asked before, I couldn't find what I was looking for. I know how to connect to Oracle and execute stored procedures from a shell script, but what I would like to do is return a value from a table and use it in my script. For Example, If I had a table Called... (1 Reply)
Discussion started by: mode09
1 Replies

10. Shell Programming and Scripting

Stripping ret of the lines in a file (sed question)

Hi all, I didn't use SED for 20 years and was never an expert. So my current knowledge is about zero. Please be patient with me. I'm neither a native speaker. I have a huge dictionary file and want the rest of the lines stripped. Everything after (and including) the "/" should be stripped. I... (2 Replies)
Discussion started by: Hinnerk2005
2 Replies
MAIN(3) 								 1								   MAIN(3)

main - Dummy formain(3)

	There  is  no  function  named	main(3)  except  in  the  PHP  source.	In  PHP  4.3.0,  a  new  type  of error handling in the PHP source
       (php_error_docref) was introduced. One feature is to provide links to a	manual	page  in  PHP  error  messages	when  the  PHP	directives
       html_errors (on by default) and docref_root (on by default until PHP 4.3.2) are set.

	Sometimes  error messages refer to a manual page for the function main(3) which is why this page exists. If you discover such a reference,
       please file a bug report, indicating the PHP function caused the error that linked to main(3) and it will be fixed and properly documented.

       Known errors that point to main(3)

       +----------------+-----------------------------+
       | Function name	|			      |
       |		|			      |
       |		| No longer points here as of |
       |		|			      |
       +----------------+-----------------------------+
       |  include(3)	|			      |
       |		|			      |
       |		|	     5.1.0	      |
       |		|			      |
       |include_once(3) |			      |
       |		|			      |
       |		|	     5.1.0	      |
       |		|			      |
       |  require(3)	|			      |
       |		|			      |
       |		|	     5.1.0	      |
       |		|			      |
       |require_once(3) |			      |
       |		|			      |
       |		|	     5.1.0	      |
       |		|			      |
       +----------------+-----------------------------+
       html_errors, display_errors.

PHP Documentation Group 														   MAIN(3)
All times are GMT -4. The time now is 06:46 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy