From 40e12d9363b1dc542c42e336d39cb872ef25350e Mon Sep 17 00:00:00 2001 From: qo-op Date: Thu, 18 Feb 2021 01:24:13 +0100 Subject: [PATCH] tolower --- zen/new_file_in_astroport.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zen/new_file_in_astroport.sh b/zen/new_file_in_astroport.sh index dbc829c..23e21a7 100755 --- a/zen/new_file_in_astroport.sh +++ b/zen/new_file_in_astroport.sh @@ -36,7 +36,7 @@ TITLE="${file%.*}" [[ -f ~/.zen/ipfs/.$IPFSNODEID/G1SSB/_g1.gchange_title ]] && XZUID=$(cat ~/.zen/ipfs/.$IPFSNODEID/G1SSB/_g1.gchange_title) || XZUID=$(hostname) [[ ! $(echo "$path" | cut -d '/' -f 4 | grep 'astroport') ]] && echo "Fichiers à placer dans ~/astroport/ MERCI" && exit 1 TYPE=$(echo "$path" | cut -d '/' -f 5 ) # ex: /home/$YOU/astroport/... film, youtube, mp3 -CAT=$(echo "$TYPE" | awk '{ print tolowper($0) }') +CAT=$(echo "$TYPE" | awk '{ print tolower($0) }') [[ ! $CAT ]] && echo "CAT est le 6e champs de $path" && exit 1 PREFIX=$(echo "$TYPE" | head -c 1 | awk '{ print toupper($0) }' ) # ex: F, Y, M