Sponsored Content
Top Forums Shell Programming and Scripting Return Value from a FTP shell script Post 302400837 by jim mcnamara on Thursday 4th of March 2010 08:57:22 AM
Old 03-04-2010
FTP produces error codes it does not return a failure status to the shell unless it has an internal error.

The error codes have to be parsed to get what you want:
FTP Error Codes Explained
And occur during normal processing.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to return value in shell script

im using bourne shell In file scriptA i add a new function, test_return() test_return() { a=1 return $a } when i try execute , a='/''/scriptA test_return echo $a its give me error.. scriptA: cannot return when not in function ist any solution for this problem.. How... (1 Reply)
Discussion started by: neruppu
1 Replies

2. Shell Programming and Scripting

No return code in ftp mget script

I have a automated FTP script that gets a file using mget. I am using mget because the date will change on the file frequently. The mget works, however if I incorrectly type the file (e.g. if I want to get /dog123 and I enter /dg*) I do not receive and error code from in the FTP session. The... (1 Reply)
Discussion started by: dog123
1 Replies

3. Shell Programming and Scripting

How to return the value from the called shell script to the calling sh script

Hi all, I have two ksh scripts #sample1.sh #!/bin/ksh . ./sample2.sh echo $fileExist #sample2.sh #!/bin/ksh func() { i=1 return $a } func echo $? Here how should I return the value of sample2.sh back to sample1.sh? Thanks in advance. (2 Replies)
Discussion started by: gp_singh
2 Replies

4. Shell Programming and Scripting

return status after run the shell script

Hello, I wanted to delete all files which are placed 14 days back. Here is my below script. My script works very well and it deletes all files 14 days back. I wanted to display message incase if the delete script is not successful. The below script returns always successful. But the directory... (6 Replies)
Discussion started by: govindts
6 Replies

5. Shell Programming and Scripting

How to return a value of a variable from shell script to perl script

HI , Is there any way to return a value of variable from shell to perl script. Code: === Perl file my $diff1=system("sh diff.sh"); my $diff2=system("sh diff1.sh"); I need exit status of below commands i.e 0 and 1 respectively. Since in both the cases diff is working so system... (3 Replies)
Discussion started by: srkelect
3 Replies

6. Shell Programming and Scripting

How to return programming to calling shell script?

Hi, I need to edit a shell script which is calling another shell script. At the moment the program returns to the command prompt after executing each called script. I need to change it to make it return to the calling script so that the user is able to make another choice to execute the next... (11 Replies)
Discussion started by: PTL
11 Replies

7. Shell Programming and Scripting

Return db2 query value to shell script

Hi, Im new to DB2. I need to connect to DB2 from shell script and return the query output back to shell script variable. this is my code #!/bin/ksh db_name=db db_user=usr db_pwd=pwd db2 <<EOSQL connect to $db_name user $db_user using "$db_pwd" select count(1) from table quit EOSQL ... (3 Replies)
Discussion started by: sup
3 Replies

8. Shell Programming and Scripting

Return output from shell script

Hi All, There are 2 scripts A and B. A --> It will invoke script B B --> It will generate below output. 100 - connected 105 - Not Connected 210 - Connected I want to return this value to script A. Please advice. (4 Replies)
Discussion started by: Girish19
4 Replies

9. Shell Programming and Scripting

Return Code to shell script

Hi, I need to send the return code from a script to the parent shell script. But i am suppressing outputs while calling the child script. Is there any way still to get the return code from the child script with suppress output. Below is my script: I am using :$ while calling return.sh... (5 Replies)
Discussion started by: usrrenny
5 Replies

10. UNIX for Beginners Questions & Answers

Email shell script return code

Hi All, I'm new to unix and I have a requirement to execute a shell script and get the return code/Exit code and send it in email. Meaninig we execute a script which in turn execute a shel script and fetches it\s return code and send it to email. I tried the code below as : ... (2 Replies)
Discussion started by: midhun3108
2 Replies
Handle Management(3)						 globus ftp client					      Handle Management(3)

NAME
Handle Management - Typedefs typedef struct globus_i_ftp_client_handle_t * globus_ftp_client_handle_t" Initialize globus_result_t globus_ftp_client_handle_init (globus_ftp_client_handle_t *handle, globus_ftp_client_handleattr_t *attr) Destroy globus_result_t globus_ftp_client_handle_destroy (globus_ftp_client_handle_t *handle) URL Caching globus_result_t globus_ftp_client_handle_cache_url_state (globus_ftp_client_handle_t *handle, const char *url) globus_result_t globus_ftp_client_handle_flush_url_state (globus_ftp_client_handle_t *handle, const char *url) User Pointer globus_result_t globus_ftp_client_handle_set_user_pointer (globus_ftp_client_handle_t *handle, void *user_pointer) globus_result_t globus_ftp_client_handle_get_user_pointer (const globus_ftp_client_handle_t *handle, void **user_pointer) Plugins globus_result_t globus_ftp_client_handle_add_plugin (globus_ftp_client_handle_t *handle, globus_ftp_client_plugin_t *plugin) globus_result_t globus_ftp_client_handle_remove_plugin (globus_ftp_client_handle_t *handle, globus_ftp_client_plugin_t *plugin) Detailed Description Create/Destroy/Modify an FTP Client Handle. Within the Globus FTP Client Library, all FTP operations require a handle parameter. Currently, only one FTP operation may be in progress at once per FTP handle. FTP connections may be cached between FTP operations, for improved performance. This section defines operations to create and destroy FTP Client handles, as well as to modify handles' connection caches. Typedef Documentation typedef struct globus_i_ftp_client_handle_t* globus_ftp_client_handle_t FTP Client Handle. An FTP client handle is used to associate state with a group of operations. Handles can have attributes associated with them. All FTP operations take a handle pointer as a parameter. See also: globus_ftp_client_handle_init(), globus_ftp_client_handle_destroy(), globus_ftp_client_handleattr_t Function Documentation globus_result_t globus_ftp_client_handle_init (globus_ftp_client_handle_t *handle, globus_ftp_client_handleattr_t *attr) Initialize a client FTP handle. Initialize an FTP handle which can be used in subsequent get, put, or transfer requests. A handle may have at most one get, put, or third-party transfer in progress. Parameters: handle The handle to be initialized. attr Initial attributes to be used to create this handle. See also: globus_ftp_client_handle_destroy() globus_result_t globus_ftp_client_handle_destroy (globus_ftp_client_handle_t *handle) Destroy a client FTP handle. A FTP client handle may not be destroyed if a get, put, or third-party transfer is in progress. Parameters: handle The handle to be destroyed. See also: globus_ftp_client_handle_init() globus_result_t globus_ftp_client_handle_cache_url_state (globus_ftp_client_handle_t *handle, const char *url) Cache connections to an FTP server. Explicitly cache connections to URL server in an FTP handle. When an URL is cached, the client library will not close the connection to the URL server after a file transfer completes. Parameters: handle Handle which will contain a cached connection to the URL server. url The URL of the FTP or GSIFTP server to cache. See also: globus_ftp_client_flush_url_state() globus_result_t globus_ftp_client_handle_flush_url_state (globus_ftp_client_handle_t *handle, const char *url) Remove a cached connection from the FTP client handle. Explicitly remove a cached connection to an FTP server from the FTP handle. If an idle connection to an FTP server exists, it will be closed. Parameters: handle Handle which will contain a cached connection to the URL server. url The URL of the FTP or GSIFTP server to cache. globus_result_t globus_ftp_client_handle_set_user_pointer (globus_ftp_client_handle_t *handle, void *user_pointer) Set/Get the user pointer field from an ftp client handle. The user pointer is provided to all the user of the FTP client library to assocate a pointer to any application-specific data to an FTP client handle. This pointer is never internally used by the client library. Parameters: handle The FTP client handle to set or query. user_pointer The value of the user pointer field. Note: Access to the user_pointer are not synchronized, the user must take care to make sure that multiple threads are not modifying it's value. globus_result_t globus_ftp_client_handle_add_plugin (globus_ftp_client_handle_t *handle, globus_ftp_client_plugin_t *plugin) Add a plugin to an FTP client handle. This function adds a plugin to an FTP client handle after it has been created. Plugins may be added to an ftp client handle whenever an operation is not in progress. The plugin will be appended to the list of plugins present in the handle, and will be invoked during any subsequent operations processed with this handle. Only one instance of a particular plugin may be added to a particular handle. Plugins may be removed from a handle by calling globus_ftp_client_remove_plugin(). Parameters: handle The FTP client handle to set or query. plugin A pointer to the plugin structure to add to this handle. See also: globus_ftp_client_remove_plugin(), globus_ftp_clent_handleattr_add_plugin(), globus_ftp_clent_handleattr_remove_plugin() globus_result_t globus_ftp_client_handle_remove_plugin (globus_ftp_client_handle_t *handle, globus_ftp_client_plugin_t *plugin) Remove a plugin to an FTP client handle. This function removes a plugin from an FTP client handle after it has been created. Plugins may be removed from an ftp client handle whenever an operation is not in progress. The plugin will be removed from the list of plugins, and will not be used during any subsequent operations processed with this handle. This function can remove plugins which were added at handle initialization time or by calling globus_ftp_client_handle_add_plugin(). Parameters: handle The FTP client handle to set or query. plugin A pointer to the plugin structure to remove from this handle. See also: globus_ftp_client_add_plugin(), globus_ftp_clent_handleattr_add_plugin(), globus_ftp_clent_handleattr_remove_plugin() globus_result_t globus_ftp_client_handle_get_user_pointer (const globus_ftp_client_handle_t *handle, void **user_pointer) Set/Get the user pointer field from an ftp client handle. The user pointer is provided to all the user of the FTP client library to assocate a pointer to any application-specific data to an FTP client handle. This pointer is never internally used by the client library. Parameters: handle The FTP client handle to set or query. user_pointer The value of the user pointer field. Note: Access to the user_pointer are not synchronized, the user must take care to make sure that multiple threads are not modifying it's value. Author Generated automatically by Doxygen for globus ftp client from the source code. Version 7.3 Mon Apr 30 2012 Handle Management(3)
All times are GMT -4. The time now is 08:44 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy