The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Ambiguous and Command not found Error in UNIX koti_rama Shell Programming and Scripting 2 07-13-2007 10:42 AM
Ambiguous and Command not found Error in UNIX koti_rama UNIX for Dummies Questions & Answers 2 07-12-2007 09:44 AM
`ls -l`: Ambiguous Guillermo Lopez Shell Programming and Scripting 2 05-29-2007 10:03 AM
ambiguous redirect mahabunta UNIX for Dummies Questions & Answers 1 09-15-2006 12:54 PM
When kill doesnt work, how to kill a process ? VijayHegde UNIX for Advanced & Expert Users 3 05-12-2006 05:24 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 03-02-2007
umen umen is offline
Registered User
  
 

Join Date: Aug 2005
Posts: 239
getting Ambiguous error on kill -9 @pid from csh

Hello all
i have simple script that executing program every 10 seconds
im invoke this script as daemon with second script that put it in the background
this is my first script (IsAliveTester.csh)

Code:
#!/bin/csh -f

@ iSleep = 10
set processName = "ClientTester"

while(1)

$processName

sleep $iSleep

end

-----------------
the secound script that invok the above script looks like this (RunIsAliveTester.csh ):


Code:
#!/bin/csh -f
IsAliveTester.csh &

----------------------------
now the third script suppose to kill the IsAliveTester.csh demon ( killIsAliveTester.csh )and it looks like this :


Code:
#!/bin/csh -f
@ pid = `ps -fu $USER | grep IsAliveTester.csh | grep -v grep | awk '{print $2}'`
kill -9 $pid


but the problem is when i run the killIsAliveTester.csh im getting the error :

Code:
`ps -fu $USER | grep IsAliveTester.csh | grep -v grep | awk '{print $2}'`: Ambiguous

when i run the onliner outside the csh its working great .

why im getting this error when running killIsAliveTester.csh
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 06:38 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0