Sponsored Content
Top Forums UNIX for Advanced & Expert Users Executing a job with file success Post 303001564 by Peasant on Monday 7th of August 2017 01:16:40 PM
Old 08-07-2017
You can test the zip archive, exit code ($?) should be zero on good file.
Code:
unzip -qtl archive.zip && printf "%s\n" "File is fine do the job.."

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how to exit with success if the file is not found

I want to put a exit if there is no file found. In the directory I can have multiple txt files with EPISGCHGS as prefix or maynot have one. When I am trying the following it is erroring if there is no text file with the EPISGCHGS as prefix. for file in EPISGCHGS*.txt do cat $file >... (2 Replies)
Discussion started by: apps_user
2 Replies

2. UNIX for Dummies Questions & Answers

Problem with executing command inside a cron job

Hi All, I have scheduled a script in cron which writes output to the below file. ....>> /data/Target/wrapper_invoke_ds_job_`date '+%Y%m%d'`.ksh_out 2>&1 But the date command is not getting resolved in the format specified. It just resolves to the following. wrapper_invoke_MQ_ds_job_Tue... (3 Replies)
Discussion started by: pkm_oec
3 Replies

3. UNIX for Dummies Questions & Answers

nohup - sub job in script not executing until I exit

My job is launched using this command: I'm at home and having VPN drops so I used nohup and background. nohup perf_mon -c rating_4_multi,cfg & The main script is PID 26119, and the sub task under it is 26118 which is not running - just sits there. 26119 runs forever but nothing else runs. I... (2 Replies)
Discussion started by: ido1957
2 Replies

4. Shell Programming and Scripting

Cron job not executing

I need to add 10 records to database from a file /tmp/authlist.log(contains insert into table sql commands) When i execute the following script manually its executing and working fine. the same is not getting executed when i try to execute using crontab vi /tmp/test1.sh #!/bin/sh... (4 Replies)
Discussion started by: kalyankalyan
4 Replies

5. Shell Programming and Scripting

NDM process say success but file didn't reach destination

I am using ndmcli to NDM my files. When i do so it prints success for the process, with out any errors, but file is not reached at destination. ndmcli -x << EOJ submit phcdb process snode=$RMT_NODE_NAME step01 copy from (file=$SRC_FILE_NAME pnode) to (file=$DST_FILE_NAME snode... (0 Replies)
Discussion started by: pattamuthu
0 Replies

6. Shell Programming and Scripting

Curl ftp upload success but no file exist on the server !!!!

hello, I'm trying to upload a file to this ftp server and others ftp://ftp.byethost12.com as you can see in the output of CURL using the -v option curl reports that the upload succeeded but when i connected to the server with file-zilla there is no file uploaded the same command upload files... (5 Replies)
Discussion started by: laraaj
5 Replies

7. Shell Programming and Scripting

adding data in input file if 2nd script output SUCCESS

Hi All, how can i edit my original data and add more data if my 2nd script outputs SUCESS? ex. input file: 1.txt nik,is,the 1script.sh if 2ndscript.sh output SUCCESS then i'm going to edit my input file and add data best,pogi.. sample outputdata. nik,is,the,best,pogi 2ndscript.sh... (3 Replies)
Discussion started by: nikki1200
3 Replies

8. UNIX for Dummies Questions & Answers

Executing python scripts via cron job

Hi, I'm executing a python script via cron job. The way it is set up is, I'm editing a file called local00 22 * * * root su - -c "/opt/setup_dir/bin/run_bkp -p" When this job executes, the command-specific logfile and the syslog (where the logs are supposed to go) show half of the logs(no... (2 Replies)
Discussion started by: ashwini.engr07
2 Replies

9. Shell Programming and Scripting

How to write SCP success or failure to a file

Does anyone know how to write the results (success and failure) to a file. I am using TCSH on a Solaris machine. I have the following code for a successful SCP...could someone help me add to this so it caputres failures also? CODE SO FAR (received from a previous post): scp sourcefile.txt... (3 Replies)
Discussion started by: thibodc
3 Replies

10. Shell Programming and Scripting

Logging success event into file

Hi, I've the following code to log the errors any after the command is executed. # Ksh 88 Version log_path=/home/etc/fls/fls_log.log del_path=/home/etc/fls/to_day rm $del_path/* >> $log_path 2>&1 But I even want to log if the rm command is success without any error along with... (1 Reply)
Discussion started by: smile689
1 Replies
ZIP_OPEN(3)						     Library Functions Manual						       ZIP_OPEN(3)

NAME
zip_open - open zip archive LIBRARY
libzip (-lzip) SYNOPSIS
#include <zip.h> struct zip * zip_open(const char *path, int flags, int *errorp); DESCRIPTION
The zip archive specified by path is opened and a pointer to a struct zip, used to manipulate the archive, is returned. The are specified by or'ing the following values, or 0 for none of them. ZIP_CREATE Create the archive if it does not exist. ZIP_EXCL Error if archive already exists. ZIP_CHECKCONS Perform additional consistency checks on the archive, and error if they fail. If an error occurs and errorp is non-NULL, it will be set to the corresponding error code. RETURN VALUES
Upon successful completion zip_open returns a struct zip pointer. Otherwise, NULL is returned and *errorp is set to indicate the error. ERRORS
The archive specified by path is opened unless: [ZIP_ER_EXISTS] The file specified by path exists and ZIP_EXCL is set. [ZIP_ER_INCONS] Inconsistencies were found in the file specified by path and ZIP_CHECKCONS was specified. [ZIP_ER_INVAL] The path argument is NULL. [ZIP_ER_MEMORY] Required memory could not be allocated. [ZIP_ER_NOENT] The file specified by path does not exist and ZIP_CREATE is not set. [ZIP_ER_NOZIP] The file specified by path is not a zip archive. [ZIP_ER_OPEN] The file specified by path could not be opened. [ZIP_ER_READ] A read error occurred; see for details. [ZIP_ER_SEEK] The file specified by path does not allow seeks. SEE ALSO
libzip(3), zip_close(3), zip_error_to_str(3), zip_fdopen(3) AUTHORS
Dieter Baron <dillo@giga.or.at> and Thomas Klausner <tk@giga.or.at> NiH February 15, 2009 ZIP_OPEN(3)
All times are GMT -4. The time now is 02:08 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy