Sponsored Content
Full Discussion: Script for validation
Top Forums Shell Programming and Scripting Script for validation Post 302844393 by smoofy on Monday 19th of August 2013 06:49:24 AM
Old 08-19-2013
I would try this:
Code:
ps -ef | grep test | grep -v grep
if [ $?==1 ] then; echo "test does not work" |mail -s "confirmation" my@address.com; fi

But I am sure there is more elegant way Smilie

Last edited by Franklin52; 08-19-2013 at 08:31 AM.. Reason: Please use code tags
This User Gave Thanks to smoofy For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need help in file validation by shell script

Hi I am new to this forum.I need a help in the following: We receve pipe delimited file with transaction ID,tran_date,Quest_cd,Ans_cd,ans_value. Same transaction ID can be repeated with different quest_cd and ans_cd. Basically I need to check if a perticular pair of quest_cd and ans_cd... (1 Reply)
Discussion started by: srichakra
1 Replies

2. Shell Programming and Scripting

UNIX script Validation

Hi, I have a UNIX script which has two parts: 1. It connects to a database and refreshes a materialized view 2. It then connects to another database and inserts refresh statistics to a table The script works, but I'm not too good at UNIX validation. Currently, if the first part of the job... (1 Reply)
Discussion started by: matchey
1 Replies

3. Shell Programming and Scripting

ISQL connectivity validation in script

1. Is there a way to validate ISQL connectivity in shell script(ksh) before executing any queries..? 2.what is the best way to handle NULL from ISQL restult assigned to a script variable ?(if ISQL connectivity fails) rowCount=`/sybase/OCS-12_5/bin/isql -S $serverName -H $hostInfo -D $dbName -U... (2 Replies)
Discussion started by: vikram3.r
2 Replies

4. Shell Programming and Scripting

Validation in shell script.

PICKUPDIR=/home/ready/ DROPDIR=/home/downloaded/ TODAY=$(date '+%d%m%y') LOGFILE=xyz-$TODAY.log ########### #FUNCTIONS# ########### #function to perform file transfer to servercopy folder opalO () { cd $PICKUPDIR for fileName in `ls -1 TES_ONE*` do cp $fileName $DROPDIR done } >>... (4 Replies)
Discussion started by: ravigupta2u
4 Replies

5. Shell Programming and Scripting

Shell script validation using process.

Hi All, I have a shell script in Linux and it will be invoked by 2 methods, 1) An automated background process . 2) Logining into the box and directly executing the script. I need to put a validation in my shell script such that it will be executed successfully on when an... (11 Replies)
Discussion started by: vininx
11 Replies

6. Shell Programming and Scripting

String validation in shell script

Hi All, I am a newbie...I would like to have a function which ll check if a file contains valid strings before "=" operator. Just to give you my requirement: assume my file has content: hello= gsdgsd sfdsg sgdsg sgdgdg world= gggg hhhh iiiii xxxx= pppp ppppp pppp my... (1 Reply)
Discussion started by: rtagarra
1 Replies

7. Shell Programming and Scripting

Application Validation Script

Hi I am going to write a script in unix that shall include code to check status of server, dmgr,db connection .Can some one assist me in determining anything else needed to automate application status . (1 Reply)
Discussion started by: vinil
1 Replies

8. Shell Programming and Scripting

Script help on sudo access validation

hello I need help on this. The input is this. server system account name DBA account name x a p y b q z c r so i would like to check the sudo of the user is done or not. this is what i do to check it 1. login as root on server x 2.... (2 Replies)
Discussion started by: Kiran008
2 Replies

9. UNIX for Dummies Questions & Answers

Validation to be added in the shell script

I need help with one of my shell script. The script is working fine but i need to add two condition - i need to get rid of all the below ftp messages and need to have only ftp completed or failed message. example when i run the script i get below lines - Connected to xxxx 220 (vsFTPd... (1 Reply)
Discussion started by: chandraprakash
1 Replies

10. Shell Programming and Scripting

Help with validation of URLs in shell script

hello every one I wrote the script to validate all the urls from my server . sourcing text file which contains the list of urls and trying to check every url and based on response printing url is up or not. the issue when i use the below code with url is printing url exist and and in loop it's... (3 Replies)
Discussion started by: markjohn1
3 Replies
ZGREP(1)						    BSD General Commands Manual 						  ZGREP(1)

NAME
zgrep, zegrep, zfgrep -- print lines matching a pattern in gzip-compressed files SYNOPSIS
zgrep [grep-flags] [--] pattern [files ...] zegrep [grep-flags] [--] pattern [file ...] zfgrep [grep-flags] [--] pattern [file ...] DESCRIPTION
zgrep runs grep(1) on files or stdin, if no files argument is given, after decompressing them with zcat(1). The grep-flags and pattern arguments are passed on to grep(1). If an -e flag is found in the grep-flags, zgrep will not look for a pattern argument. zegrep calls egrep(1), while zfgrep calls fgrep(1). EXIT STATUS
In case of missing arguments or missing pattern, 1 will be returned, otherwise 0. SEE ALSO
egrep(1), fgrep(1), grep(1), gzip(1), zcat(1) AUTHORS
Thomas Klausner <wiz@NetBSD.org> BSD
December 28, 2003 BSD
All times are GMT -4. The time now is 04:46 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy