Comment on peut utiliser les commande de gcc on utilisre programmation shell?
on ecrit un programme shell qui puisse compiler et executer des programmes on C
merci
lrwxrwxrwx 1 root root 4 déc 15 2005 /bin/sh -> bash
#!/bin/bash echo "==== MENU COMPILE ====" echo -e "1. hello1.c\n2. hello2.c\n3. hello3.c\n\n" echo -e "Faites votre choix : \c " read choix case $choix in '1') gcc -o hello1 hello1.c ./hello1 ;; '2') gcc -o hello2 hello2.c ./hello2 ;; '3') gcc -o hello3 hello3.c ./hello3 ;; *) echo "Mauvaise choix" esac
#!/bin/sh
DIALOG=dialog
$DIALOG --backtitle "MENU DE COMPILATION" \
--title "COMPILATION" \
--radiolist "Faites votre choix : " 0 0 0 \
"Hello1.c" "Compilation programme Hello1." off \
"Hello2.c" "Compilation programme Hello2." off \
"Hello3.c" "Compilation programme Hello3" off 2>/tmp/checklist.tmp.$$
retval=$?
choix=`cat /tmp/checklist.tmp.$$`
rm -f /tmp/checklist.tmp.$$
case $retval in
0) case $choix in
Hello1.c) gcc -o hello1 hello1.c
./hello1
;;
Hello2.c) gcc -o hello2 hello2.c
./hello2
;;
Hello3.c) gcc -o hello3 hello3.c
./hello3
;;
esac
;;
*)
echo "Programme arrêté...";;
esac;-))
Combien cela coûte-t-il au total ? Quelles aides apportent l'état et les acteurs du marché pour alléger cette charge non choisie ? Tous les détails sur Commentçamarche.net.