Quote:
Originally Posted by rambler
Hi all
i want to write a ksh file that can be able to get a path directory and execute an other bach file
|
A bach file? I use mplayer. 
Quote:
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`
|
Why grep?
Code:
SUBDIR=`ls $WORK_DIR/*ecx-batch-1* | tail -n 1`
Quote:
Code:
SCRIPT_DIR="$WORK_DIR/$SUBDIR"
#echo : that put the right path OK !!!!
echo $SCRIPT_DIR
. `$SCRIPT_DIR`/bin/target.sh
|
Code:
. "$SCRIPT_DIR"/bin/target.sh
Last edited by cfajohnson; 03-17-2009 at 07:03 PM..
|