info:if.sh

if.sh if elif then - condtitions with unix

kw if then elif elsif loop conditions bash

#!/bin/bash
cd ~/Bureau
antiword TRUC.DOC > TRUC.txt
echo "Vérification de la conversion word -> txt"
ls -alF TRUC*
echo "Souhaitez-vous copier ces fichiers sur su@TRUC:/w3/TRUC/"
echo "oui (1)
non (0)"
read i
echo $i
if [ "$i" = "0" ]
then
	echo "sortie du programme"
elif [ "$i" = "1" ]
then
	scp TRUC su@TRUC:/w3/TRUC/
	ssh su@TRUC chmod 700 /w3/TRUC/INDASS.*
	echo "Fichiers copiés et droits mis à jour"
fi
  • info/if.sh.txt
  • Dernière modification : 2018/07/18 09:45
  • de radeff