Sponsored Content
Full Discussion: Rather: not found
Top Forums Shell Programming and Scripting Rather: not found Post 302512619 by ygemici on Monday 11th of April 2011 05:01:37 AM
Old 04-11-2011
change your line to
Code:
[ `pidof $i | sed '/^$/d'|wc -l` -gt 0 ] && echo "$i service already running..." >> $log || (/etc/init.d/$i start ; echo "$i restarted..." )>> $log

This User Gave Thanks to ygemici For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

HELP ld.so.1 NOT FOUND

I made the fatal mistake of rename the usr directory. I cannot run any commands due to the fact that ld.so.1 is in usr/lib/--and it doesn't exist How can I recover my system? (1 Reply)
Discussion started by: SmartJuniorUnix
1 Replies

2. Shell Programming and Scripting

how can i check in csh if command found or not found ?

hello all im trying to use in sun Solaris the information received from the top command now i several machines that dont have install the top program so when im running the script im geting error saying after im running this code : set MemoryInfo = `top | grep Memory` if (... (2 Replies)
Discussion started by: umen
2 Replies

3. UNIX for Dummies Questions & Answers

OM not found

Hello everybody: Im facing this weird problem on my SUN V890 running SOL9, from time to time I keep getting this error from the prompt when i press enter for blank: OM: not found sometimes if I entered a coomand it will give me: OM(command name):not found, but repeating the same command it... (4 Replies)
Discussion started by: aladdin
4 Replies

4. Solaris

-sh: H: not found

I have found this error when i logged in as root: su - Any body have any idea where this error coming from or what is not working? -Adeel (1 Reply)
Discussion started by: deal732
1 Replies

5. UNIX for Dummies Questions & Answers

^M: not found

Hi All, when i ran a shell script ,its showing "^M: not found" errore i used the the code dos2unix sunshine.sh sunshine1.sh and then again i ran the scriptand then its still showing the errore please help me in the matter. thanks... (3 Replies)
Discussion started by: manit
3 Replies

6. Shell Programming and Scripting

Need help ( sh: not found )

I have the script like this - When i try to running manually it's running as well, no error but when i put on the cronjob it give output Somebody can help me ? (6 Replies)
Discussion started by: justbow
6 Replies

7. Shell Programming and Scripting

sh: +: not found

hello all, In a perl script I am writing, $dd =`expr $dd + 1`; for adding $dd, but getting following error: sh: +: not found Please help!! (2 Replies)
Discussion started by: gentleDean
2 Replies

8. UNIX and Linux Applications

^M not found

hi: I had an existing script in production and I commented some lines and implemented the same. The scripts fails with a cc of 127 and I get the msg: ^M: not found I checked the file format and it is a PC file format. Does this cause the script to fail with cc= 127. Can somebody... (4 Replies)
Discussion started by: Meghna
4 Replies

9. Programming

curses.h not found , gtk/gtk.h not found

i have downloaded <libncurses5-dev_5.7+20101128-1_i386.deb> and <ndk++-0.0.1alpha4.tar.bz2> which contains the header files curses.h and gtk/gtk.h .. i have also included them using .. #include "/home/ball/Desktop/Sudoku/project/libncurses5-dev_5.7+20101128-1_i386/usr/include/curses.h" ... (2 Replies)
Discussion started by: upvan111
2 Replies

10. Shell Programming and Scripting

If first pattern is found, look for second pattern. If second pattern not found, delete line

I had a spot of trouble coming up with a title, hopefully you'll understand once you read my problem... :) I have the output of an ldapsearch that looks like this: dn: cn=sam,ou=company,o=com uidNumber: 7174 gidNumber: 49563 homeDirectory: /home/sam loginshell: /bin/bash uid: sam... (2 Replies)
Discussion started by: samgoober
2 Replies
GIT-SH-SETUP(1) 						    Git Manual							   GIT-SH-SETUP(1)

NAME
git-sh-setup - Common git shell script setup code SYNOPSIS
. "$(git --exec-path)/git-sh-setup" DESCRIPTION
This is not a command the end user would want to run. Ever. This documentation is meant for people who are studying the Porcelain-ish scripts and/or are writing new ones. The git sh-setup scriptlet is designed to be sourced (using .) by other shell scripts to set up some variables pointing at the normal git directories and a few helper shell functions. Before sourcing it, your script should set up a few variables; USAGE (and LONG_USAGE, if any) is used to define message given by usage() shell function. SUBDIRECTORY_OK can be set if the script can run from a subdirectory of the working tree (some commands do not). The scriptlet sets GIT_DIR and GIT_OBJECT_DIRECTORY shell variables, but does not export them to the environment. FUNCTIONS
die exit after emitting the supplied error message to the standard error stream. usage die with the usage message. set_reflog_action set the message that will be recorded to describe the end-user action in the reflog, when the script updates a ref. git_editor runs an editor of user's choice (GIT_EDITOR, core.editor, VISUAL or EDITOR) on a given file, but error out if no editor is specified and the terminal is dumb. is_bare_repository outputs true or false to the standard output stream to indicate if the repository is a bare repository (i.e. without an associated working tree). cd_to_toplevel runs chdir to the toplevel of the working tree. require_work_tree checks if the repository is a bare repository, and dies if so. Used by scripts that require working tree (e.g. checkout). get_author_ident_from_commit outputs code for use with eval to set the GIT_AUTHOR_NAME, GIT_AUTHOR_EMAIL and GIT_AUTHOR_DATE variables for a given commit. AUTHOR
Written by Linus Torvalds <torvalds@osdl.org[1]> DOCUMENTATION
Documentation by Junio C Hamano and the git-list <git@vger.kernel.org[2]>. GIT
Part of the git(1) suite NOTES
1. torvalds@osdl.org mailto:torvalds@osdl.org 2. git@vger.kernel.org mailto:git@vger.kernel.org Git 1.7.1 07/05/2010 GIT-SH-SETUP(1)
All times are GMT -4. The time now is 01:47 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy