Je commence en cette commande pour vérifier un hachage SHA1 d'un fichierCréer un alias pour grep sur le terminal Mac
shasum filename.txt |grep -E --color '<hash value>|$'
Je créé un alias pour elle:
alias shacheck='check_sha_hash'
check_sha_hash() {
shasum $1 |grep -E --color '$2|$'
}
Mais il n'a pas aide:
shacheck myfile.txt 3a5b106e413ab621ad13788e5ceab8ba1d974cb8
3a5b106e413ab621ad13788e5ceab8ba1d974cb8 myfile.txt --> didn't colorized the hash
Qu'est-ce que j'ai fait de mal?
Où avez-vous défini l'alias et la fonction, sur votre session terminal _current_ ou dans l'un des fichiers de démarrage, par ex. '.bashrc'? – Inian
oui dans '.bashrc' –