diff --git a/grabber.sh b/grabber.sh index 4924753..2b93cc3 100755 --- a/grabber.sh +++ b/grabber.sh @@ -37,7 +37,14 @@ apt list --installed 2> >(tee -a $ERROR_LOG) >$DIR/apt-installed.cmd \ && echo "[OK]: Fichier apt-installed.cmd généré" |tee -a $SUCCESS_LOG \ || echo "[ECHEC]: Erreur à la génération de apt-installed.cmd" |tee -a $ERROR_LOG +# Commande array +tee -a $SUCCESS_LOG $ERROR_LOG <$DIR/status.log + +for disk in ${!PARTITIONS_BY_DISK[@]}; do + echo "PARTS_$disk=$(printf '%s ' ${PARTITIONS_BY_DISK[$disk]})" >>$DIR/status.log +done + +treat_file() { + echo "Les arguments: $@" + echo "Argument 1: $1" + cat $2 >>$DIR/$1 + +} + +treat_file sources_list.file /etc/apt/sources.list + +for file in ${!FILES[@]}; do + treat_file $file ${FILES[$file]} +done + #cat /etc/passwd > $DIR/passwd.file #cat /etc/group > $DIR/group.file #lspci -nn > $DIR/lspci.cmd