# SCRIPT - BASH 1/ Ecrivez un script qui convertit en minutes et secondes un temps exprimé en secondes (le temps est passé en paramètre). Video math in bash 2/ Ecrivez un script qui convertit en heures, minutes et secondes un temps exprimé en secondes (le temps est passé en paramètre). A quoi sert le signe mathématique % (MODULO) 3/ Écrivez un script qui convertit en années, jours heures, minutes et secondes un temps exprimé en secondes (le temps est passé en paramètre). 4/ Ecrivez un script qui convertit un nombre de bit en Ko Mo Go To 5/ Ecrivez un script qui convertit un nombre de To en bit. Comparer avec les résultats du script 4. 6/ Ecrivez un script qui enregistre dans un fichier les lignes saisies au clavier, et qui affiche le nombre de lignes qui ont été enregistrées. 7/ Écrire un script qui permet de sauvegarder dans une archive le contenu d’un répertoire utilisateur dans une archive NOM-UTILISATEUR.tar.gz Exemple ``` (base) phil@phil-Satellite-L350:~/SCRIPT$ tar -cvf script.tar.gz /home/phil/SCRIPT/ tar: Suppression de « / » au début des noms des membres /home/phil/SCRIPT/ tar: /home/phil/SCRIPT/script.tar.gz : le fichier est l'archive elle-même ; fichier non archivé /home/phil/SCRIPT/boucle-for.sh /home/phil/SCRIPT/log /home/phil/SCRIPT/[0]/ /home/phil/SCRIPT/boucle.sh /home/phil/SCRIPT/i/ /home/phil/SCRIPT/2/ /home/phil/SCRIPT/[2]/ /home/phil/SCRIPT/suite.sh /home/phil/SCRIPT/boucle-for-infini.sh /home/phil/SCRIPT/script3.sh /home/phil/SCRIPT/1/ /home/phil/SCRIPT/arg.sh /home/phil/SCRIPT/script4.sh /home/phil/SCRIPT/0/ /home/phil/SCRIPT/dec-bin.sh /home/phil/SCRIPT/script2.sh /home/phil/SCRIPT/bin-dec2.sh /home/phil/SCRIPT/script5.sh /home/phil/SCRIPT/[1]/ /home/phil/SCRIPT/script.sh (base) phil@phil-Satellite-L350:~/SCRIPT$ ls 0 2 boucle-for-infini.sh i script4.sh suite.sh [0] [2] boucle-for.sh log script5.sh 1 arg.sh boucle.sh script2.sh script.sh [1] bin-dec2.sh dec-bin.sh script3.sh script.tar.gz ``` 8/ Ecrivez un script qui convertit un nombre décimal en octet (le nombre décimal est passé en paramètre) ex: 254 est traduit par 1111 1110 Rappel :