- Modifié
Rajoute juste après :
Et copie tous le résultat ici. Comme je dit j'ai pas testé le script, et j'ai pas la possibilité avant ce soir de tester.
#!/bin/bash
Ceci :
set -xa
Ce qui donne en entier :
#!/bin/bash
set -xa
NAME=$1
FOLDER=$2
## Check if folder
file "$FOLDER/$NAME" | grep "directory" > /dev/null 2>&1
if [ $? -eq 0 ]; then
FOLDER="$FOLDER"/"$NAME"
NB_FILE=$(ls -1 "$FOLDER" | grep -Ev '.txt|.nfo|.md' | wc -l)
if [ $NB_FILE -gt 1 ]; then
TMP="/tmp/file.tmp"
ls -1 | grep -Ev '.txt|.nfo|.md' > $TMP
while read file; do
plowup uptobox $FOLDER/$file &
done < $TMP
else
FILE=$(ls $FOLDER)
plowup uptobox $FOLDER/$FILE &
fi
else
FILE=$FOLDER/$NAME
plowup uptobox $FILE &
fi
Et copie tous le résultat ici. Comme je dit j'ai pas testé le script, et j'ai pas la possibilité avant ce soir de tester.