The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Error ^M not found while using read command raoscb UNIX for Dummies Questions & Answers 4 05-20-2008 07:37 AM
Ambiguous and Command not found Error in UNIX koti_rama Shell Programming and Scripting 2 07-13-2007 06:42 AM
why emacs caused "command not found" error cy163 UNIX for Dummies Questions & Answers 1 05-01-2007 01:17 PM
how can i check in csh if command found or not found ? umen Shell Programming and Scripting 2 03-03-2007 04:38 PM
getting Ambiguous error on kill -9 @pid from csh umen Shell Programming and Scripting 0 03-02-2007 09:34 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1  
Old 07-12-2007
Registered User
 

Join Date: Jun 2007
Posts: 45
Ambiguous and Command not found Error in UNIX

Hi,All
I wrote below script(Example1.sh) and i ran but it giveing error. it's excuted yesterday.

SYSTEM_TIME=`date '+%H:%M:%S'`

CMP_LOG_TIME=`head -1 runcmp-HINET.log`

CMP_ENDED1=`grep 'HINET CMP ended' runcmp-HINET.log`

CMP_ENDED2=`echo "HINET CMP ended"`
CMP_FAILED2=`echo "HINET CMP failed"`
FAILED_TIME1="0"

echo $SYSTEM_TIME
echo $CMP_ENDED1


Error:
77 DIT1_hnt@smmk183> Example1.sh
SYSTEM_TIME=06:40:13: Command not found
CMP_LOG_TIME=`head -1 runcmp-HINET.log`: Ambiguous
CMP_ENDED1=: Command not found
CMP_ENDED2=`echo "HINET CMP ended"`: Ambiguous
CMP_FAILED2=`echo "HINET CMP failed"`: Ambiguous
FAILED_TIME1=0: Command not found
SYSTEM_TIME: Undefined variable


please help me on this
Reply With Quote
Forum Sponsor
  #2  
Old 07-12-2007
Shell_Life's Avatar
Registered User
 

Join Date: Mar 2007
Location: Bahia, Brazil
Posts: 695
Place the following in the first line of the shell:
Code:
#!/bin/ksh
Reply With Quote
  #3  
Old 07-12-2007
Registered User
 

Join Date: Dec 2005
Posts: 74
unknown command

Hi,
Your script is perfectly valid,
may be put
#! /bin/sh

or

run the script like this
sh example.sh

may be u may get a different output

Best Regards,
Rakesh UV
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 01:25 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0