U:bettercounter-cli.sh

This commit is contained in:
T0MuX 2025-01-11 23:13:50 +01:00
parent 44054971b3
commit 2cceae456e

View file

@ -5,6 +5,14 @@ original_file="exemple.csv"
# Nom du fichier temporaire pour traitement
temp_file="temp.csv"
# Si fichier précisé, l'utiliser
if [ ! -z $1 ]; then original_file="$1"; fi
# Vérifie si le fichier CSV existe
if [[ ! -f "$original_file" ]]; then
echo "Le fichier $original_file n'existe pas." exit 1
fi
# Créer une copie du fichier original
cp "$original_file" "$temp_file"