14 Jun
2001
14 Jun
'01
10:57
Charlie Ti
i created a function and i neet to use the out code of the intire function and not only of the last action of the function. Is there a way to do it?
Here is my code :
function backup { cp -Ru /windows/e/3dsmax/scenes/ /mnt/charlie/backup/ cp -Ru /mnt/charlie/publications/ /mnt/charlie/backup/ cp -Ru /mnt/charlie/img/ /mnt/charlie/backup/ cp -Ru /mnt/charlie/mp3/ /mnt/charlie/backup/ }
backup;CODE_RETOUR=$? if [ $CODE_RETOUR = 0 ]; then echo $NORMAL else echo $ERREUR fi
BTW, you can also use: function backup { cp -Ru /windows/e/3dsmax/scenes /mnt/charlie/publications \ /mnt/charlie/img /mnt/charlie/mp3 /mnt/charlie/backup } -- Alexandr.Malusek@imv.liu.se