Sponsored Content
Top Forums Shell Programming and Scripting Read exit value from Shell script Post 303000593 by RudiC on Saturday 15th of July 2017 03:43:04 AM
Old 07-15-2017
Try
Code:
returnvalue=`ssh DOMAIN\\\\user1@10.7.7.68 'cmd /c "del C:\Users\user1\db_test.bak"' 2>&1`

although I'm not too sure how MS handles error msgs to stderr nor how it assigns exit codes.

Last edited by RudiC; 07-15-2017 at 04:48 AM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

exit shell script from function

Hi all, I have tried to put a exit 0 statement within a function I have created in the shell script but it doesn't seem to exit out of the script? Can someone tell me why? And is there any other way to exit out of the script from within a function? Thanks! (1 Reply)
Discussion started by: nvrh7
1 Replies

2. Shell Programming and Scripting

exit a shell script!!

could somebody tell me please how to exit a shell script: if then echo "No arguments detected" exit 1 fi ... echo "still there" # is displayed .. :-( (4 Replies)
Discussion started by: sami98
4 Replies

3. Shell Programming and Scripting

unable to exit from a shell script

Hi All, I am unable to exit from a shell script using the below code: #!/bin/ksh passchk() ( if ;then echo "Password validated" else echo "Wrong password Quiting the application..." exit 0#not working fi ) passchk (Note:"finalresult" passed to the passchk... (2 Replies)
Discussion started by: Sreejith_VK
2 Replies

4. Shell Programming and Scripting

how to exit out of the calling Shell Script

Hi All, I tried looking for this, but was not able to get a clear answer. Hence posting here. Please find the details below. Thanks for the help I have 2 shell scripts, script1.sh and script2.sh. I call script2.sh from within script1.sh ( by simple ./script2.sh command). Based on some... (7 Replies)
Discussion started by: harimac
7 Replies

5. Shell Programming and Scripting

How to grep sql error in shell script and exit the script?

I need help in the following script. I want to grep the sql errors insert into the error table and exit the shell script if there is any error, otherwise keep running the scripts. Here is my script #!/bin/csh -f source .orapass set user = $USER set pass = $PASS cd /opt/data/scripts echo... (2 Replies)
Discussion started by: allinshell99
2 Replies

6. Shell Programming and Scripting

exit shell from a script

hi guys I have a script that I need to terminate or exit the shell or session completely for the user but the exit only exit from the script and takes the user to the shell I found this https://www.unix.com/unix-dummies-questions-answers/399-using-exit-command-shell-script.html saying that... (1 Reply)
Discussion started by: kopper
1 Replies

7. Shell Programming and Scripting

Exit a shell script

Hi Guys, How can I exit from the shell script if a condition is not met? Thanks in advance... (2 Replies)
Discussion started by: Phuti
2 Replies

8. Shell Programming and Scripting

How to capture the exit code of a shell script in a perl script.?

hi, i want to pop up an alert box using perl script. my requirement is. i am using a html page which calls a perl script. this perl script calls a shell script.. after the shell script ends its execution, i am using exit 0 to terminate the shell script successfully and exit 1 to terminate the... (3 Replies)
Discussion started by: Little
3 Replies

9. Shell Programming and Scripting

Exit the shell script

Hi, suppose my script is sample.sh i have to run using '. ./sample.sh' as . ./script file always executes the script in my parent shell. when my sample.sh contains exit command .. my environment is getting closed as am executing in the parent shell ... please suggest me how can i use... (5 Replies)
Discussion started by: pracheth
5 Replies

10. UNIX for Beginners Questions & Answers

How to continue shell script after exit 0?

Hi, I am writing a shell script where I am sourcing other shell script in that script I have mention exit 0 due to that it is not continue the first script. Except doing any changes to source script is there any way I can continue the my first script. (3 Replies)
Discussion started by: sonujatav
3 Replies
Locale::Currency(3)					User Contributed Perl Documentation				       Locale::Currency(3)

NAME
Locale::Currency - standard codes for currency identification SYNOPSIS
use Locale::Currency; $curr = code2currency('usd'); # $curr gets 'US Dollar' $code = currency2code('Euro'); # $code gets 'eur' @codes = all_currency_codes(); @names = all_currency_names(); DESCRIPTION
The "Locale::Currency" module provides access to standard codes used for identifying currencies and funds, such as those defined in ISO 4217. Most of the routines take an optional additional argument which specifies the code set to use. If not specified, the default ISO 4217 three-letter codes will be used. SUPPORTED CODE SETS
There are several different code sets you can use for identifying currencies. A code set may be specified using either a name, or a constant that is automatically exported by this module. For example, the two are equivalent: $curr = code2currency('usd','alpha'); $curr = code2currency('usd',LOCALE_CURR_ALPHA); The codesets currently supported are: alpha, LOCALE_CURR_ALPHA This is a set of three-letter (uppercase) codes from ISO 4217 such as EUR for Euro. Two of the codes specified by the standard (XTS which is reserved for testing purposes and XXX which is for transactions where no currency is involved) are omitted. This is the default code set. num, LOCALE_CURR_NUMERIC This is the set of three-digit numeric codes from ISO 4217. ROUTINES
code2currency ( CODE [,CODESET] ) currency2code ( NAME [,CODESET] ) currency_code2code ( CODE ,CODESET ,CODESET2 ) all_currency_codes ( [CODESET] ) all_currency_names ( [CODESET] ) Locale::Currency::rename_currency ( CODE ,NEW_NAME [,CODESET] ) Locale::Currency::add_currency ( CODE ,NAME [,CODESET] ) Locale::Currency::delete_currency ( CODE [,CODESET] ) Locale::Currency::add_currency_alias ( NAME ,NEW_NAME ) Locale::Currency::delete_currency_alias ( NAME ) Locale::Currency::rename_currency_code ( CODE ,NEW_CODE [,CODESET] ) Locale::Currency::add_currency_code_alias ( CODE ,NEW_CODE [,CODESET] ) Locale::Currency::delete_currency_code_alias ( CODE [,CODESET] ) These routines are all documented in the Locale::Codes::API man page. SEE ALSO
Locale::Codes The Locale-Codes distribution. Locale::Codes::API The list of functions supported by this module. http://www.iso.org/iso/support/currency_codes_list-1.htm The ISO 4217 data. AUTHOR
See Locale::Codes for full author history. Currently maintained by Sullivan Beck (sbeck@cpan.org). COPYRIGHT
Copyright (c) 1997-2001 Canon Research Centre Europe (CRE). Copyright (c) 2001 Michael Hennecke Copyright (c) 2001-2010 Neil Bowers Copyright (c) 2010-2013 Sullivan Beck This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.16.3 2013-06-03 Locale::Currency(3)
All times are GMT -4. The time now is 04:08 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy