Sponsored Content
Top Forums Programming Capturing a ret val of C obj file in ksh script Post 302073605 by k_bijitesh on Tuesday 16th of May 2006 07:07:12 AM
Old 05-16-2006
Thanks vino for ur reply. But that syntax is not working.
Instead grumpf's suggestion is working. Thanks grumpf and jim mcnamara.

My problem is solved. But, just out of curiosity, I want to know the way of returning a character string or simply a character from C executable to calling shell script.

Thanks in advance,
Bijitesh
 

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
exit(1) 							   User Commands							   exit(1)

NAME
exit, return, goto - shell built-in functions to enable the execution of the shell to advance beyond its sequence of steps SYNOPSIS
sh exit [n] return [n] csh exit [ ( expr )] goto label ksh *exit [n] *return [n] DESCRIPTION
sh exit will cause the calling shell or shell script to exit with the exit status specified by n. If n is omitted the exit status is that of the last command executed (an EOF will also cause the shell to exit.) return causes a function to exit with the return value specified by n. If n is omitted, the return status is that of the last command exe- cuted. csh exit will cause the calling shell or shell script to exit, either with the value of the status variable or with the value specified by the expression expr. The goto built-in uses a specified label as a search string amongst commands. The shell rewinds its input as much as possible and searches for a line of the form label: possibly preceded by space or tab characters. Execution continues after the indicated line. It is an error to jump to a label that occurs between a while or for built-in command and its corresponding end. ksh exit will cause the calling shell or shell script to exit with the exit status specified by n. The value will be the least significant 8 bits of the specified status. If n is omitted then the exit status is that of the last command executed. When exit occurs when executing a trap, the last command refers to the command that executed before the trap was invoked. An end-of-file will also cause the shell to exit except for a shell which has the ignoreeof option (See set below) turned on. return causes a shell function or '.' script to return to the invoking script with the return status specified by n. The value will be the least significant 8 bits of the specified status. If n is omitted then the return status is that of the last command executed. If return is invoked while not in a function or a '.' script, then it is the same as an exit. On this man page, ksh(1) commands that are preceded by one or two * (asterisks) are treated specially in the following ways: 1. Variable assignment lists preceding the command remain in effect when the command completes. 2. I/O redirections are processed after variable assignments. 3. Errors cause a script that contains them to abort. 4. Words, following a command preceded by ** that are in the format of a variable assignment, are expanded with the same rules as a vari- able assignment. This means that tilde substitution is performed after the = sign and word splitting and file name generation are not performed. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | |Availability |SUNWcsu | +-----------------------------+-----------------------------+ SEE ALSO
break(1), csh(1), ksh(1), sh(1), attributes(5) SunOS 5.10 15 Apr 1994 exit(1)
All times are GMT -4. The time now is 10:46 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy