Category Archives: Unix/Linux

Convertir code caractère en code ASCII

codeASCII=$(printf « %d\n » \’${SEPARATEUR} 2>/dev/null)

Taille d’une variable

Pour connaître la taille d’une variable en shell :

t= »123456″

echo ${#t}

renvoie 6

Trier un fichier CSV

Pour trier un fichier CSV

sort -o -t ‘‘ -k

Exemple :

sort toto.csv -o toto_trie.csv -t ‘;’ -k 1,2