Explanation reqd


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Explanation reqd
# 1  
Old 04-07-2011
Explanation reqd

Hi,
i have a script of following content
Code:
#!/usr/bin/sh
'exit 255' USR1 
ncm_CheckDir.pl -a 
/cnt/mgr/test/working/applog_CheckDir.log -c 
/cnt/mgr/test/lib/config/bp_CheckDir.conf -s 
/cnt/mgr/test/log/syslog

filename : BC_CheckDir
when i execute ie :
Code:
sh BC_CheckDir

i am getting error
Code:
BC_CheckDir[11]: ncn_CheckDir.pl: not found

this ncn_CheckDir.pl is available in the same folder where the BC_CheckDir exist .
That is in my system file
BC_CheckDir and perl file
ncm_CheckDir.pl available in /cnt/mgr/test/bin

can any one explain why this error is coming and what is happening
in the script

note : i am running this in ksh

thanks in advance
hari

Last edited by Franklin52; 04-07-2011 at 05:46 AM.. Reason: Please use code tags
# 2  
Old 04-07-2011
can you try hardcoding the path to ncn_CheckDir.pl ( also is there a typo ncn_CheckDir.pl and ncm_CheckDir.pl ?? )

Code:
#!/usr/bin/sh
'exit 255' USR1 
./ncm_CheckDir.pl -a 
/cnt/mgr/test/working/applog_CheckDir.log -c 
/cnt/mgr/test/lib/config/bp_CheckDir.conf -s 
/cnt/mgr/test/log/syslog

or


Code:
#!/usr/bin/sh
'exit 255' USR1 
/cnt/mgr/test/bin/ncm_CheckDir.pl -a 
/cnt/mgr/test/working/applog_CheckDir.log -c 
/cnt/mgr/test/lib/config/bp_CheckDir.conf -s 
/cnt/mgr/test/log/syslog

# 3  
Old 04-07-2011
Hmmm... To me it seems like the error comes from line 11; you posted your script on 6 lines.
Can't find ncn_CheckDir.pl, script says ncm_CheckDir.pl -a. Do you have a typo there, or was it when you were typing it into the post?

# 4  
Old 04-07-2011
sorry guys

it is ncn_CheckDir.pl -a only
Code:
#!/usr/bin/sh
'exit 255' USR1  
ncn_CheckDir.pl -a 
/cnt/mgr/test/working/applog_CheckDir.log -c 
/cnt/mgr/test/lib/config/bp_CheckDir.conf -s 
/cnt/mgr/test/log/syslog

ncn_CheckDir.pl exist in the folder

but error is coming

pls help me

thanks & regards
Hari

Last edited by Franklin52; 04-07-2011 at 06:58 AM.. Reason: Please use code tags
# 5  
Old 04-07-2011
call it with ./ as suggested by pkabali
Code:
./ncn_CheckDir.pl

and make sure ncn_CheckDir.pl is executable.
# 6  
Old 04-07-2011
i tried both way as pkbali suggested
still not found error is coming
when i put ./ncn_CheckDir.pl it is giving me
BC_CheckDir[11]: ./ncn_CheckDir.pl: not found

when hard coded the path then also
with all path and not found is coming Smilie

---------- Post updated at 06:02 AM ---------- Previous update was at 04:55 AM ----------

any settings to be done with .profile file ??
# 7  
Old 04-07-2011
shot in the dark here. Maybe an issue with permissions on the .pl file? is it executable

Also as Mirni said, have you pasted the entire code ( because it seems the error is in line 11? )
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

unable to grep the reqd field

hi all, i have a data sm thg like this 28504 0 abc 148782859 42 101M nhmmmm ilopo abc 2345432 i want to get only the field which is just aftr abc i,e., 148782859, 2345432 i have used grep /abc\t/ filename to get that but its not working can any 1 help me out (5 Replies)
Discussion started by: anurupa777
5 Replies

2. Shell Programming and Scripting

Explanation reqd for the Unix file

Hi, I have a unix file with the following contents #/usr/bin/sh cd /ct/mr/prod/bin ncm_AdjCob.pl -a /ct/mr/prod/wg/applog_AdjDev.log -c /ct/mr/prod/lib/config/bcmp_AdjDevCob.conf -s /ct/mr/prod/log/syslog can anyone explain what it says. particularly -a ,-c... (5 Replies)
Discussion started by: psthariharan
5 Replies

3. Shell Programming and Scripting

Help reqd in shell scripting..

Hi guys, I am new to shell scripting and I need urgent assistance. I have an xml like : <AgreementNumberFull>13-WY-84252</AgreementNumberFull> <AgreementNumberAbbr>WY84252</AgreementNumberAbbr> <LineOfBusiness>F</LineOfBusiness> <CompanyCode>0005</CompanyCode> <UniqDigit/> <StateCode/> ... (9 Replies)
Discussion started by: puneetkanchi
9 Replies

4. Red Hat

Help reqd in installing wireless usb on fed 14

Hello all, I am fed up on trying to install my newly purchased usb wireless antenna to my fedora14 machine; so I seek help of all you linux masterminds out there. It worked well in my Win XP. Please help me in setting up it to my Fedora. . Details follows: The device model is : Aztech... (5 Replies)
Discussion started by: gsabarinath
5 Replies

5. Shell Programming and Scripting

Shell Script - help Reqd

Hi, I need someone's help in writing a shell script. Since am very new i am stuck . I have 2 files in the same dir. ============================================== FileA Table1~07/07/2009 00:00:00~4 Table1~07/06/2009 00:00:00~41 Table1~07/08/2009 00:00:00~4 ... (8 Replies)
Discussion started by: vijayarajvp
8 Replies

6. Shell Programming and Scripting

unix shell script reqd...

Task: Short Description: To find the files in a particular directory for the previous day, sort them by date and time and e-mail it across to a particular id. And the time is divided into eight fields and based on the time the respective field should be updated with the flag 1. Eight... (7 Replies)
Discussion started by: venkatesht
7 Replies

7. Shell Programming and Scripting

AWK help reqd

Hi, I have below requirement that I need to do it using AWK. Files ==== File1: data file that has thousands of recs File2: Lookup file I need to compare the position 21-31 of File1 with 1-11 of File2. If matched then write to new output file(outfile1) else write to another output... (17 Replies)
Discussion started by: Sathy153
17 Replies

8. Shell Programming and Scripting

Checklist for Shell Script reqd

Hi, Can anyone provide me with the Code Review Checklist for Shell scripts ?? Thanks in advance. (2 Replies)
Discussion started by: Shivdatta
2 Replies

9. HP-UX

command reference sheet reqd.

hi everybody, i m AIX guy.... due 2 some reason i was also askd 2 work in HP-UX so i think all d concepts r same as AIX.... so i thought it s easy to learn by comparitve study.... if so then wr can i get the materials???????? thanks in advance........ (1 Reply)
Discussion started by: rrlog
1 Replies

10. HP-UX

Help Reqd

Hi I am facing the problem where my HP Unix system date is in accordance with the current date but the logs written by the same is of previous time stamp. Eg. System Date - Thu Mar 15 18:00:04 IST 2007 Syslogs - Mar 15 12:30:10 mac@1 ftpd: FTP LOGIN FROM xx.xxx.xxx.xx , main The ftp... (1 Reply)
Discussion started by: PradeepRed
1 Replies
Login or Register to Ask a Question