J'ai ces fonctions dans mon .bashrc:Bash: comment utiliser une fonction (qui est une chaîne param) dans une autre fonction
# This function just untar a file:
untar()
{
tar xvf $1
}
# This function execute a command with nohup (you can leave the terminal) and nice for a low priority on the cpu:
nn()
{
nohup nice -n 15 "[email protected]" &
}
Avant de tester la fonction nn, je crée un goudron:
echo test > test.txt
tar cvf test.txt.tar test.txt
maintenant ce que je veux faire est:
nn untar test.txt.tar
Mais seulement cela fonctionne:
nn tar xvf test.txt.tar
Ici l'erreur dans nohup.out:
nice: ‘untar’: No such file or directory