The UNIX and Linux Forums  

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




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 03-17-2009
rambler rambler is offline
Registered User
  
 

Join Date: Oct 2008
Posts: 10
bach file callign a bach file

Hi all
i want to write a ksh file that can be able to get a path directory and execute an other bach file

my scripte semm like that


Code:
#!/bin/ksh

ENV_ID=$1
WORK_DIR=${PWD%/bin}

#definition de la variable d'environement de la derniere version ECX
SUBDIR=`ls $WORK_DIR/| grep "ecx-batch-1" | tail -1`

SCRIPT_DIR="$WORK_DIR/$SUBDIR"

#echo : that put the right path OK !!!!
echo $SCRIPT_DIR  

. `$SCRIPT_DIR`/bin/target.sh

the last line get me an error like :
myScript.ksh[14]: path_name: cannot execute
myScript.ksh[14]: /bin/target.sh: not found

thank you in advance