Sponsored Content
Full Discussion: return code not captured
Top Forums Shell Programming and Scripting return code not captured Post 302087699 by ranj@chn on Tuesday 5th of September 2006 06:36:43 AM
Old 09-05-2006
return code not captured

Hi all,
We have a script in our Unix box(HP-UX 11.11) which is invoked as
Code:
script1.sh param1 param2 >>${logfile}               script2.sh "param"

Actually the script2 is also called from the same line. There is no semicolon between the 2 calls. I also checked the octal dump. What happens here is that the return code of the script1 is checked in script2. 2-3 days back, script1 failed but script2 didnt catch the error.

What I would like to know is whether this is a valid syntax? And why the script2 doesnt catch the error? Any suggestions would be very helpful.

Regards,
Ranj

Last edited by ranj@chn; 09-05-2006 at 07:38 AM.. Reason: typo
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Return code from PL/SQL Code

Hi Guys, I was just wondering if anybody can help me with this problem. OK, how we can get a value back from PL/SQL Script (not stored procedure/function) See the below example: (for example aaa.sh) #!/bin/ksh VALUE=`sqlplus -s user/password@test_id <<EOF @xxx.sq EOF` echo $VALUE ... (7 Replies)
Discussion started by: Shaz
7 Replies

2. Cybersecurity

Reading and Manipulating captured packets (pflog file)

Hey, I currently have a set of captured sessions thru ethereal, saved in pflog files, basically its a tcpdump, which i need to go thru and sort the applications/protocols in order of the times they were used. I also need to change the headers of the packets, basically the source and destination... (0 Replies)
Discussion started by: PenguinDevil
0 Replies

3. UNIX for Dummies Questions & Answers

Informix function return value needs to be captured in shell script

I need to run a 4ge from within my shell script and capture the string value that is being returned into a unix variable. I have tried the back ticks to no avail. I know it is returning because I did get the returned value to go to my screen at one point.. What I have is: sendlist =... (3 Replies)
Discussion started by: jeniferz
3 Replies

4. Shell Programming and Scripting

asking about return code

hi all my system is linux red hat i have a script that runs some object . the object return some code to the system i see the code by writing echo $? i want to ask in the script if $? equals 14 how shell is do that in the script thanks (3 Replies)
Discussion started by: naamas03
3 Replies

5. UNIX for Dummies Questions & Answers

to pick up the Return Code ( RC) from the mailx command and return it to SAS uisng 's

Hi All, Can anyone please let me know the syntax / how to pick up the Return Code ( RC) from the mailx command and return it to SAS uisng 'system()' function and '${?}'. I am in a process to send the mail automatically with an attachment to bulk users. I have used 'Mailx' and 'Unencode'... (0 Replies)
Discussion started by: manas6
0 Replies

6. Shell Programming and Scripting

Need help with return code 1...

Hi Guys,, I am having a unix script which is running the DB2 Insert command. For the insert command, there were no records to be updated. SQL0100W No row was found for FETCH, UPDATE or DELETE; or the result of a query is an empty table. SQLSTATE=02000 + + echo 1 STAGE_RC=1 + ] ... (6 Replies)
Discussion started by: mac4rfree
6 Replies

7. Shell Programming and Scripting

return code help

Hello folks, I have a question that if i type ls command and type echo $? it always show "0", how i could do this change that when i type ls it will show me 1, actually i want to change the return code of commands from 0 to 1. Thanks Bash (5 Replies)
Discussion started by: learnbash
5 Replies

8. Shell Programming and Scripting

File name should not be captured if still copying

HI, I am running a shell script on a folder where our sources files will be published for every 5 mins, I am copying all the source files(i.e .csv format) to a .txt as ls *.csv > camp.txt. Now when the above command is executing some files which are not copied completely , their name is also... (6 Replies)
Discussion started by: subhasri_2020
6 Replies

9. Shell Programming and Scripting

[Solved] Output in bash script not captured in variable

I'm tring to write down a simple script that would execute a command and wait until it returns a specific result. This is what i did: bjobs_out=`bjobs` while ]; do bjobs_out=`bjobs` sleep 6 done It seems to work until the command 'jobs' return the list of jobs in execution, but... (4 Replies)
Discussion started by: lifedj
4 Replies

10. Shell Programming and Scripting

How could I use the value of return code

Hello, I am woring on a script where I am getting strange situation.This script actually fetch the source code and tar that code and send to NAS location.This code resides in MKS tool...and we are fetching the source code on checkpoint label basis and script is working fine.First it synch the... (0 Replies)
Discussion started by: anuragpgtgerman
0 Replies
rcov(1) 						    rcov test coverage analysis 						   rcov(1)

NAME
rcov - create a code coverage report for Ruby tests SYNOPSIS
rcov [options] <script1.rb> [script2.rb] [-- --extra-options] DESCRIPTION
rcov is a code coverage tool for Ruby. It creates code coverage reports showing the unit test coverage of the target code. rcov does "statement coverage", also referred to as "C0 coverage analysis". It tests, if each line of the source code has been executed. rcov is typically used to find the areas of a program that have not been sufficiently tested. It reports, what code has not been run by any test cases. It can easily be integrated into build processes (e.g. with rake or rant) and creates the coverage reports in HTML or text format. OPTIONS
-o, --output Destination directory. -I, --include PATHS Prepend PATHS to $: (colon separated list) --[no-]comments Mark all comments by default. (default: --no-comments) --test-unit-only Only trace code executed inside TestCases. --spec-only Only trace code executed inside RSpec specs. -n, --no-color Create colorblind-safe output. -i, --include-file PATTERNS Generate info for files matching a pattern (comma-separated regexp list) -x, --exclude PATTERN Don't generate info for files matching a pattern (comma-separated regexp list) --exclude-only PATTERNS Skip info only for files matching the given patterns. --rails Skip config/, environment/ and vendor/. --[no-]callsites Show callsites in generated XHTML report. (somewhat slower; disabled by default) --[no-]xrefs Generate fully cross-referenced report. (includes --callsites) -p, --profile Generate bogo-profiling info. -r, --range RANGE Color scale range for profiling info (dB). -a, --annotate Generate annotated source code. -T, --text-report Dump detailed plain-text report to stdout. (filename, LoC, total lines, coverage) -t, --text-summary Dump plain-text summary to stdout. --text-counts Dump execution counts in plaintext. --text-coverage Dump coverage info to stdout, using ANSI color sequences unless -n. --gcc Dump uncovered line in GCC error format. --aggregate FILE Aggregate data from previous runs in FILE. Overwrites FILE with the merged data. FILE is created if necessary. -D, --text-coverage-diff [FILE] Compare code coverage with saved state in FILE, defaults to coverage.info. Implies --comments. --save [FILE] Save coverage data to FILE, for later use with rcov -D. (default: coverage.info) --[no-]html Generate HTML output. (default: --html) --css relative/path/to/custom.css Use a custom CSS file for HTML output. Specified as a relative path. --sort CRITERION Sort files in the output by the specified field (name, loc, coverage) --sort-reverse Reverse files in the output. --threshold INT Only list files with coverage < INT %. (default: 101) --failure-threshold [INT] Fail if the coverage is below the threshold (default: 100) --charset CHARSET Charset used in Content-Type declaration of HTML reports. --only-uncovered Same as --threshold 100 --replace-progname Replace $0 when loading the .rb files. -w Turn warnings on (like ruby). --no-rcovrt Do not use the optimized C runtime. (will run 30-300 times slower) --diff-cmd PROGNAME Use PROGNAME for --text-coverage-diff. (default: diff) -h, --help Show extended help message --report-cov-bug SELECTOR Report coverage analysis bug for the method specified by SELECTOR (format: Foo::Bar#method, A::B.method) --version Show version EXAMPLES
To simply run rcov on all ruby files in the current directory and create a HTML coverage report in ./coverage: rcov *.rb To run the tests in ./tests, include ./lib, only take care of code executed from TestCases and output a summary to STDOUT: rcov --test-unit-only -t -I./lib ./tests/*.rb SEE ALSO
runit(1), rake(1), rant(1) http://github.com/relevance/rcov Full Documentation about the integration into other tools is available in /usr/share/doc/rcov/README.* AUTHOR
The manpage is provided by Micah Anderson <micah@debian.org> as part of the Debian's rcov package. Upstream author of rcov is Mauricio Fer- nandez <mfp@acm.org>. All the option descriptions have mainly be taken from the help output of rcov. rcov 0.8.1.2 2007-11-22 27 April 2008 rcov(1)
All times are GMT -4. The time now is 01:38 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy