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
Urgent for shell script sunnysunny Shell Programming and Scripting 4 03-04-2008 11:42 AM
Script Needed Urgent in shell or PERL!!!!!!!!!!!!!!!!!!!! aajan Shell Programming and Scripting 1 10-24-2007 01:28 AM
Urgent help needed - shell script aarora_98 SUN Solaris 3 01-25-2007 10:26 AM
Calling CGI Perl in Shell script [urgent] DeepakXavier Shell Programming and Scripting 0 10-08-2005 10:51 PM

Reply
 
LinkBack Thread Tools Display Modes
  #8 (permalink)  
Old 4 Weeks Ago
Registered User
 

Join Date: Aug 2008
Posts: 3
Code:
#!/bin/sh
LOADER="/dq5/bin"
echo $LOADER           
 # iam in the same folder where i  loader.exe file.   So not doing cd to bin #folder 
 
$LOADER/loader  -t abc.cfg -f  /dq5/java/data.txt
echo $true
$LOADER/loader  -t def.cfg  -f          /dq5/java/data1.txt
above shell scritp works without error but doesnot perform intended operation.Can anyone help in this?

even when i tried giving a file name which doesnot exist ,it ran without any erros but didnot perform the loading which i was expecting to happen......

Last edited by vnmshenoy; 4 Weeks Ago at 11:10 PM.
Reply With Quote
Forum Sponsor
  #9 (permalink)  
Old 4 Weeks Ago
Smiling Dragon's Avatar
Disorganised User
 
Join Date: Nov 2007
Location: New Zealand
Posts: 674
Add a few tests to make sure it's working correctly:
Code:
#!/bin/sh
LOADER="/dq5/bin/loader"
if [ ! -x $LOADER]
then
  echo "$LOADER missing or wrong permissions!"
  exit 1
fi

for file in abc.cfg def.cfg
do
  if [ ! -r $file ]
  then
    echo "$file missing or wrong permissions!"
    exit 1
  fi
done

if [ ! -w /dq5/java/ ]
then
  echo "/dq5/java/ missing or wrong permissions!"
  exit 1
fi

$LOADER -t abc.cfg -f /dq5/java/data.txt
$LOADER -t def.cfg -f /dq5/java/data1.txt
If it still fails silently, run this and report back what it says:
Code:
file /dq5/bin/loader
and
Code:
truss /dq5/bin/loader
Reply With Quote
Google UNIX.COM
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 07:59 AM.


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

Content Relevant URLs by vBSEO 3.2.0