previous up next contents
Previous: qyx_docs_runlevels Up: Batches spécifiques Next: qzk_kicker_gere   Contents

qyy_docs_strip


#! /bin/sh
# strip

    stamp=`date +%y%m%d%H%M`
      dir=/home/douillet/docs/sys
     name=$dir/strip_$1
sed_strip=$dir/sed_strip

mkdir -p $dir

if test $2
  then from=$2/$1
  else from=$1
fi

if test ! -f $from
  then echo
  echo "file $from does not exists" 
  echo ; exit
fi

if test -f $name
  then
  cp $name $name.$stamp
fi

cat << EOF > $sed_strip

s/^# #/###/g
/^# / d
/^    #/ d
/^#$/ d
/^$/ d

EOF





echo "##### #" $1 "   (" `date +%d/%m/%Y\ %Hh%M` ")" > $name
echo "" >> $name

sed -f $sed_strip $from >> $name
chmod a+w $name

rm $sed_strip

rv_edit $name 2> /dev/null

echo $name


previous up next contents
Previous: qyx_docs_runlevels Up: Batches spécifiques Next: qzk_kicker_gere   Contents


douillet@ensait.fr
2003-06-24