I use the command line from SAP command line system. The direct command xsltproc works. When I use it in a script placed in a directory /usr/sap/trans/command, there is a message "command not found". Here is the script
file="/shared/TQ1/ATA/IN/filelist.txt"
echo "$file second"
echo "param $1"
#find /shared/TQ1/ATA/INTER -type f *.xml > /shared/TQ1/ATA/IN
echo "\n after find"
couc=`date +%y%m%d`
file2=$file
echo "&couc"
echo "`date +%y%m%d%H%M%S%N`"
echo "file2=$file2"
echo "before xsltproc"
xsltproc -o /shared/TQ1/ATA/OUT/integrity.xml /usr/sap/trans/command/ATADecrypt_integrity.xsl /shared/TQ1/ATA/INTER/ataLocalizationXML.xml
echo "after xsltroc"
#echo "\n sortie"
The variable couc is not affected
couc=date +%y%m%d
It seems that the script can't access to the system variable date
but when I use echo "date +%y%m%d%H%M%S%N" I receive 211003112644437803137 with the script
I call the script with sh /usr/sap/trans/command/myscript.sh or bash /usr/sap/trans/command/myscript.sh
outputfile after execution of script
/shared/TQ1/ATA/IN/filelist.txt
second
param
/shared/TQ1/ATA/INTER/ataLocalizationXML.xml
\n after find
&couc
211003125447931677292
file2
=/shared/TQ1/ATA/IN/filelist.txt
before xsltproc
warning: failed
to load external entity "/shared/TQ1/ATA/INTER/ataLocalizationXML.xml
" unable to parse /shared/TQ1/ATA/INTER/ataLocalizationXML.xml
after xsltroc
Be careful. Check the result of the all the file (to right of the screen).
/shared/TQ1/ATA/INTER/ataLocalizationXML.xml(as XML). It is possible that some higher-level component that attempts to run the script reports that incorrectly as "command not found", but that does not appear to be the root problem.