syntax error not able to find why


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting syntax error not able to find why
# 1  
Old 06-26-2008
syntax error not able to find why

Hi Guru's

here is part of my shell script where the error is coming.
Code:
function daemon_start
{
   daemon=""
   clear
   :<<COMMENT                         
   Meenakshi 25-Jun Code Cleanup IA - code comented - Start
   echo "

                       `date`                        
                        $machine_name BBUWS MENU
                        -----------------------
                        
                        1) Start bbuw_watch
                        2) Start bbteleuwwatch                    
                        3) Start bblogpurgeauto
                        4) Start bbweekend_startstop_auto
                        5) Start unas_loader_auto
                        6) Start bureau_engine_auto
                        7) Start bureau_engine_watch
                        8) Start bureau_monitor_auto 
                        9) Start prebureau_watch
                       10) Start fraud_utc_auto
                       11) Start loststolen_loader_auto
                       12) Start start_checkbt_auto
                       13) Start icbatch_auto
                       14) Start Auto Process
                       15) Start rdc_engine_auto
                       16) Start rdc_engine_watch
                       17) Start rdc_monitor_auto
                       18) Start disposition_auto
                       19) Start idanalytics_engine_watch
                       20) Start idanalytics_monitor_auto
                       21) Start idanalytics_decline_batch
                       22) Start UW Auto Process
                        Q) Quit Menu           
                       
                        Enter Selection: \c"
Meenakshi 25-Jun Code Cleanup IA - code comented - Start              
COMMENT                        
echo "

                       `date`                        
                        $machine_name BBUWS MENU
                        -----------------------
                        
                        1) Start bbuw_watch
                        2) Start bblogpurgeauto
                        3) Start bbweekend_startstop_auto
                        4) Start unas_loader_auto
                        5) Start bureau_engine_auto
                        6) Start bureau_engine_watch
                        7) Start bureau_monitor_auto 
                        8) Start prebureau_watch
                        9) Start fraud_utc_auto
                       10) Start loststolen_loader_auto
                       11) Start Auto Process
                       12) Start rdc_engine_auto
                       13) Start rdc_engine_watch
                       14) Start rdc_monitor_auto
                       15) Start disposition_auto
                       16) Start idanalytics_engine_watch
                       17) Start idanalytics_monitor_auto
                       18) Start idanalytics_decline_batch
                       19) Start UW Auto Process
                                            
                       Q) Quit Menu           
                       
                        Enter Selection: \c"                        
	read OPTION
	case $OPTION
	in     
        1) daemon="bbuw_watch"
           run_daemon               
           ;;
#Meenakshi 25-Jun Code Cleanup IA - code comented - Start             
#       2) daemon="bbteleuwwatch"
#         run_daemon          
#        ;; 
#Meenakshi 25-Jun Code Cleanup IA - code comented - End  
        2) daemon="bblogpurgeauto"
           run_daemon       
           ;; 
        3) daemon="bbweekend_startstop_auto"
           run_daemon       
           ;;
        4) daemon="unas_loader_auto"
           run_daemon       
           ;; 
        5) daemon="bureau_engine_auto"
           run_daemon       
           ;;  
        6) daemon="bureau_engine_watch"
           run_daemon       
           ;;  
        7) daemon="bureau_monitor_auto"
           run_daemon       
           ;; 
        8) daemon="prebureau_watch"
           run_daemon       
           ;; 
        9) daemon="fraud_utc_auto"
           run_daemon       
           ;;  
       10) daemon="loststolen_loader_auto"
           run_daemon       
           ;;  
:<<COMMENT  
Meenakshi 25-Jun Code Cleanup IA - code comented - Start  
       12) daemon="start_checkbt_auto"
           run_daemon       
           ;;  
       13) daemon="icbatch_auto"
           run_daemon       
           ;;  
Meenakshi 25-Jun Code Cleanup IA - code comented - End  
COMMENT
       11) daemon="auto_process_daemon"
	  run_daemon	
	   ;;	
       12) daemon="rdc_engine_auto"
	  run_daemon		
           ;; 
       13) daemon="rdc_engine_watch"
       	  run_daemon		
           ;; 
       14) daemon="rdc_monitor_auto"
       		run_daemon		
           ;;	
       15) daemon="disposition_daemon_start.sh"
       		run_daemon	       		
           ;; 
       16) daemon="ida_engine_watch"
       		run_daemon	       		
           ;; 
       17) daemon="ida_monitor_auto"
       		run_daemon	       		
       	   ;; 
       18) daemon="ida_decline_batch"
       		run_daemon	       		
           ;; 
       19) daemon="uw_autoprocess_daemon"
              		run_daemon	       		
           ;; 
       q|Q|0) break
           ;; 
  
        esac
        daemon_show  
}

when i am running the script i am getting an error
syntax error at line 1179 : `)' unexpected

line 1179 is above the line in red colour.
is the problem coming because of multiple line comment.

Thanks
Namish

Last edited by namishtiwari; 06-26-2008 at 10:01 AM..
# 2  
Old 06-26-2008
I have fixed the problem, actually there was semicolon missing in the case statement in the earlier part of the code.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

FIND and GREP syntax

I have a question to this command find . -type f -name ".*txt" -exec grep "text" {}\. The find command will locate a file name with the extension of txt once per round and find the word "text" in the content of the file or the find command will locate all the file names with the extension of... (2 Replies)
Discussion started by: TestKing
2 Replies

2. Shell Programming and Scripting

Using find and mv syntax

I have the following script working currently. The only thing I want to add is to somehow tell the script to find the files using the find and maxdepth variables and then move the files to a corresponding file structure. example: file test.txt exists in the /data/user1/upload directory The... (4 Replies)
Discussion started by: jwt66
4 Replies

3. Shell Programming and Scripting

Help with decoding the 'find' command syntax

Hi folks, I just want to understand what this find command does. The syntax "- - -" is cumbersome and unusual. Please let me know what it is for? find - - - share/ ../share/ -type f ! -path '*/CVS*' (8 Replies)
Discussion started by: royalibrahim
8 Replies

4. UNIX for Dummies Questions & Answers

uanble to find while and for loop syntax in unix

Hi friends, I am unable to find for loop or while loop syntax on ksh shell,same syntax is working in other shell ,please suggest a way through. error :syntax error at line 2: `(' unexpected syntax used : for ((i=1;i<=$v1;i++)) thanks, Jcpratap (9 Replies)
Discussion started by: Jcpratap
9 Replies

5. UNIX for Dummies Questions & Answers

Find/Grep Syntax Question

Hi Folks, I am trying to dig through about 100 directories that have 1 or 2 .jpg images stored in each. I want to copy the .jpg to another file in the root directory. Really my ultimate goal is not to have to dig down into each directory to copy the images individually. I thought I could use a... (2 Replies)
Discussion started by: alpinescott
2 Replies

6. UNIX for Advanced & Expert Users

Help with complex find syntax

I need to modify the find command below to exclude the output of the directory /usr/UDPM/PerfMgmt/shmlck find / \( -fstype ctfs -o -fstype mntfs -o -fstype objfs -o -fstype proc -o ! local \) -prune -o -type f -perm -0002 -print 2>/dev/null I have tried many iterations and placement of... (2 Replies)
Discussion started by: interesting?
2 Replies

7. Shell Programming and Scripting

find syntax

i'm trying to find out how to find in my directory and subdirectories a certain file. once i find that file, i need to select that folder and copy it the location or output it to a new text file. i know how to find the file by using find . -name \*.pl | sort -n but idk how to select... (9 Replies)
Discussion started by: kpddong
9 Replies

8. UNIX for Dummies Questions & Answers

find mtime syntax

Hi guys, I am looking for a way of moving all files out of a directory with a time stamp greater then the one I specify. Can anyone suggest a way of doing so? For example, move all files out of dir1 which were created after 17:00 into dir2. Thanks :) (1 Reply)
Discussion started by: JayC89
1 Replies

9. Shell Programming and Scripting

Can I know find syntax to find given date files

Hi All, Can i use find command to know given date files? If yes, then please let me know the syntax for the same. Thanks in advance for your postive responses Regards, Bachegowda (3 Replies)
Discussion started by: bache_gowda
3 Replies

10. UNIX for Dummies Questions & Answers

Question: non-recursive find syntax

Hello, I am trying to search a directory for all files matching "G*" without looking in sub-directories "success" and "error". I've searched this forum and found the following syntax, but can't make it work: find . \( ! -name success -prune -name error -prune \) -type f -name "G*" Have... (6 Replies)
Discussion started by: alexkav
6 Replies
Login or Register to Ask a Question