Sponsored Content
Full Discussion: Verification on shell script
Top Forums Shell Programming and Scripting Verification on shell script Post 302855579 by gacanepa on Friday 20th of September 2013 10:26:15 AM
Old 09-20-2013
I insist that checking the existence of a file is not the best way to allow or deny its execution.
What I would do is wget the file, then if that command completed successfully I'd start the download operation, otherwise I'd show the error message, more like so:
Code:
wget $MIRROR/pack76.sh
	if [ $? == 0 ]
	then
		sh pack76.sh
	else
		echo -e "$RED The download cannot be performed $RESET"
	fi

Hope it helps.
This User Gave Thanks to gacanepa For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

verification?

I'm really new at this and wondering how I would go about adding code to my script to verify that all records loaded successfully? (I am loading a file into a table) i'm using the Korn shell. I'm also having trouble verifying parts in the header as i do not really understand the header and... (3 Replies)
Discussion started by: sheranjem
3 Replies

2. UNIX for Dummies Questions & Answers

Verification of a script already running - where to do it

Hi, I have a script I want to run as a background process. Where would I add a bit of script so that a check can be performed to see it this is already running and, where it isn't, to then run it? I know how to do this... I just don't know where I can put the initial part of the check script so... (2 Replies)
Discussion started by: miwinter
2 Replies

3. Shell Programming and Scripting

Email address verification script

Hi Group, Please forgive in case this is discussed. I need help regarding a simple script to verify if the give address exist in the Ldap directory. If the email exists the script should exit with a 0 status or else a non zero status. I am currently using the following script (and it is... (4 Replies)
Discussion started by: Ramdas
4 Replies

4. Programming

htable + verification

hello every body, I have to verifiy if the param_key is selectionned twice or more and to print only one occurence i'm using htable what's the good implementation to add to the code to verify this. code : { char *tmpStr = NULL; ght_iterator_t iterator_param; void... (0 Replies)
Discussion started by: kamel.seg
0 Replies

5. AIX

HACMP verification

Hi, every midnight hacmp verification is run automatically. clverify.log says there is no erro bu clutils.log says there is 1 error but when i look at the clverify.log no problem at all. Below is the output of the clverify.log what may be the cause of the error in the clutils.log file. Thanks,... (1 Reply)
Discussion started by: mmersoylu
1 Replies

6. Shell Programming and Scripting

Script for verification of Data corruption

Hi, I am from File system back ground and doing File system testing on Linux, I need script that scirpt that create the different multiple types of .txt, device file and then copy to mount point /mnt/ dir and then verify the created files and copied files, if created files and copied files are... (4 Replies)
Discussion started by: manish_tcs_hp
4 Replies

7. Shell Programming and Scripting

Script Verification

Hi eveyone I am planning to use crontab to delete all files in my donwloads directory that are older than one hour I will be using crontab to run this script find /home/kee/downloads/* -daystart -mmin +59 -type f -name -exec rm -r {}\; could you please let me know if the above... (1 Reply)
Discussion started by: k33k00
1 Replies

8. Shell Programming and Scripting

Field verification script help

Hello again unix.com I need some help regarding a script. I have: function checkform ( form ) { if (form.pass.value.length < 6) { alert( "Error." ); form.pass.focus(); document.getElementById('pass').style.backgroundColor="#FFFFFF"; return... (2 Replies)
Discussion started by: galford
2 Replies

9. Programming

ECDSA verification

Using ECDSA, how do you verify integrity of Data (D), Given the value for the following: Random number (r) Signature (s) ECpublic Key (K) Thanks. (0 Replies)
Discussion started by: dragonpoint
0 Replies

10. OS X (Apple)

SHA1 verification script

Hi guys! Me again! ... I'm trying to build (on MacOS directly) a bash script that will help me verify a SHA1 digest (to verify downloads and so on and so forth). So first off, here's my version of BASH under OSX: bash-4.4$ And here's my version of Sierra (macOS): 10.12.3 (16D32) ... (2 Replies)
Discussion started by: Ardzii
2 Replies
download(1)							   User Commands						       download(1)

NAME
download - host resident PostScript font downloader SYNOPSIS
download [-f] [-p printer] [-m name] [-H directory] [file...] /usr/lib/lp/postscript/download DESCRIPTION
download prepends host resident fonts to files and writes the results on the standard output. If no files are specified, or if - is one of the input files, the standard input is read. download assumes the input files make up a single PostScript job and that requested fonts can be included at the start of each input file. Requested fonts are named in a comment (marked with %%DocumentFonts:) in the input files. Available fonts are the ones listed in the map table selected using the -m option. The map table consists of fontname-file pairs. The fontname is the full name of the PostScript font, exactly as it would appear in a %%Doc- umentFonts: comment. The file is the pathname of the host resident font. A file that begins with a / is used as is. Otherwise the pathname is relative to the host font directory. Comments are introduced by % (as in PostScript) and extend to the end of the line. The only candidates for downloading are fonts listed in the map table that point download to readable files. A font is downloaded once, at most. Requests for unlisted fonts or inaccessible files are ignored. All requests are ignored if the map table can not be read. OPTIONS
-f Force a complete scan of each input file. In the absence of an explicit comment pointing download to the end of the file, the default scan stops immediately after the PostScript header comments. -p printer Check the list of printer-resident fonts in /etc/lp/printers/printer/residentfonts before downloading. -m name Use name as the font map table. A name that begins with / is the full pathname of the map table and is used as is. Other- wise name is appended to the pathname of the host font directory. -H directory Use dir as the host font directory. The default is /usr/lib/lp/postscript. EXAMPLES
Example 1: Examples of the download command. The following map table could be used to control the downloading of the Bookman font family: % % The first string is the full PostScript font name. The second string % is the file name - relative to the host font directory unless it begins % with a /. % Bookman-Light bookman/light Bookman-LightItalic bookman/lightitalic Bookman-Demi bookman/demi Bookman-DemiItalic bookman/demiitalic Using the file myprinter/map (in the default host font directory) as the map table, you could download fonts by issuing the following command: example% download -m myprinter/map file EXIT STATUS
The following exit values are returned: 0 Successful completion. non-zero An error occurred. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWpsf | +-----------------------------+-----------------------------+ SEE ALSO
dpost(1), postdaisy(1), postdmd(1), postio(1), postmd(1), postprint(1), posttek(1), attributes(5) NOTES
The download program should be part of a more general program. download does not look for %%PageFonts: comments and there is no way to force multiple downloads of a particular font. Using full pathnames in either map tables or the names of map tables is not recommended. SunOS 5.10 9 Sep 1996 download(1)
All times are GMT -4. The time now is 10:09 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy