#! /bin/csh -f
#source /opt/phenix/bin/phenix_setup.csh ana.175
#set count=$1
set count="00"
if($1 >= 10)set count="0"
if($1 >= 100)set count=""
set fcount=$count$1
/bin/mkdir input_urqmd_5to10_$fcount
echo `pwd`
cd input_urqmd_5to10_$fcount
setenv ftn09 inputfile
setenv ftn13 freezeout
setenv ftn14 outputfile
setenv ftn15 collisionfile
setenv ftn16 outputfile_with_decaying_resonances
setenv ftn19 urqmd_5to10_decay_$fcount.oscar97
setenv ftn20 urqmd.oscar99
/bin/cp -f ../input/inputfile1 inputfile

setenv timestamp `date +%s`
#echo $$
#echo $timestamp
@ final = 0
@ final = $timestamp + $$
#echo "result : "$final

#setenv str1 "rsd,"$$

setenv str1 "rsd,"$final
setenv str s/rsd/$str1/g
sed $str inputfile > input2
tr ',' ' ' < input2 > output
mv output inputfile
rm input2
../bin/urqmd.Linux
/bin/mv -f urqmd_5to10_decay_$fcount.oscar97 ../data/.
