Bonjour Jean-Michel,
> #!/bin/sh
> ###############################################################################
> # Torque submitfilter
> # JMB 28/09/2007
> # Version 1.0
> ###############################################################################
> # Preambule
> ###############################################################################
> #echo "#PBS -l nodes=nanpcw1"
> #echo "#PBS -j oe"
> echo "#PBS -k oe"
> ###############################################################################
> # Boucle de parcour des lignes du script de soumission
> ###############################################################################
> while read i
> do
> echo $i
> # echo $i >> /tmp/torque.log
> done
>
> Still no idea how this simple script is able to corrupt a file that
> goes through.
I do not see how it would replace a string like @foo with a blank,
but I notice there is at least 1 potential problem with it:
echo $i
That should be:
echo "$i"
Otherwise the white space in the input will not be preserved exactly
and the string will be subject to pathname expansion (e.g. a string
like "/*" would expand to "/afs /bin /boot [...] /var" or so).
Pathname expansion could also be avoided by setting a flag beforehand:
set -f
But the white spacing must be preserved anyway.
|