Programmation shell (bash)
Fermé
touf_truc
jipicy
- Messages postés
- 57
- Date d'inscription
- samedi 21 octobre 2006
- Statut
- Membre
- Dernière intervention
- 23 avril 2007
jipicy
- Messages postés
- 40805
- Date d'inscription
- jeudi 28 août 2003
- Statut
- Modérateur
- Dernière intervention
- 10 août 2020
A voir également:
- Programmation shell (bash)
- Coloration du shell (bash) - Conseils pratiques - Bash
- Télécharger shell bash pour windows 10 - Télécharger
- Programme shell ✓ - Forum - Astuces et Solutions
- Shell bash ✓ - Forum - Astuces et Solutions
- Outil web pour script shell/bash ✓ - Forum - Shell
6 réponses
rer_louz
24 janv. 2007 à 18:17
- Messages postés
- 276
- Date d'inscription
- mercredi 26 novembre 2003
- Statut
- Membre
- Dernière intervention
- 29 décembre 2008
24 janv. 2007 à 18:17
Bonjour.
Pas clair la question.
Ptet un exemple
gcc hello.c -o hello te compile le fichier hello.c pour te donner l'executable hello que tu lances avec la commande ./hello.
Mais je sais pas si c'est que tu voulais. reformule ta question svp.
A++
Pas clair la question.
Ptet un exemple
gcc hello.c -o hello te compile le fichier hello.c pour te donner l'executable hello que tu lances avec la commande ./hello.
Mais je sais pas si c'est que tu voulais. reformule ta question svp.
A++
mamiemando
25 janv. 2007 à 13:50
- Messages postés
- 31312
- Date d'inscription
- jeudi 12 mai 2005
- Statut
- Modérateur
- Dernière intervention
- 12 août 2022
25 janv. 2007 à 13:50
Heu ce que tu cherches à faire c'est pas simplement un makefile ?
dubcek
25 janv. 2007 à 15:48
- Messages postés
- 18534
- Date d'inscription
- lundi 15 janvier 2007
- Statut
- Contributeur
- Dernière intervention
- 12 août 2022
25 janv. 2007 à 15:48
mamiemando a raison, la commande make a été inventée pour ça ...
lami20j
25 janv. 2007 à 16:35
- Messages postés
- 21331
- Date d'inscription
- jeudi 4 novembre 2004
- Statut
- Modérateur, Contributeur sécurité
- Dernière intervention
- 30 octobre 2019
25 janv. 2007 à 16:35
Salut,
je sais que Miss a raison :-)) je dirais la même chose
je sais que Miss a raison :-)) je dirais la même chose
touf_truc
26 janv. 2007 à 11:06
- Messages postés
- 57
- Date d'inscription
- samedi 21 octobre 2006
- Statut
- Membre
- Dernière intervention
- 23 avril 2007
26 janv. 2007 à 11:06
si je mis
#!/bin/bash
DIALOG=${DIALOG=dialog}
FILE='$DIALOG --stdout -- "Choisir un fichier" --fselect $HOME/ 14 48'
comment je peux terminer cette procedure?
#!/bin/bash
DIALOG=${DIALOG=dialog}
FILE='$DIALOG --stdout -- "Choisir un fichier" --fselect $HOME/ 14 48'
comment je peux terminer cette procedure?
jipicy
26 janv. 2007 à 11:35
- Messages postés
- 40805
- Date d'inscription
- jeudi 28 août 2003
- Statut
- Modérateur
- Dernière intervention
- 10 août 2020
26 janv. 2007 à 11:35
Re-
Alors déjà y'a un "os" dans ton bout de script, il manque "title" :
;-))
Alors déjà y'a un "os" dans ton bout de script, il manque "title" :
#!/bin/bash DIALOG=${DIALOG=dialog} FILE='$DIALOG --stdout --title "Choisir un fichier" --fselect $HOME/ 14 48'Ben une fois le fichier choisi, suffit d'exploiter la variable "$FILE" dans le reste de ton script...
;-))
touf_truc
26 janv. 2007 à 11:48
- Messages postés
- 57
- Date d'inscription
- samedi 21 octobre 2006
- Statut
- Membre
- Dernière intervention
- 23 avril 2007
- Messages postés
- 40805
- Date d'inscription
- jeudi 28 août 2003
- Statut
- Modérateur
- Dernière intervention
- 10 août 2020
26 janv. 2007 à 11:48
mais Comment?
merci
merci
jipicy
26 janv. 2007 à 11:53
- Messages postés
- 40805
- Date d'inscription
- jeudi 28 août 2003
- Statut
- Modérateur
- Dernière intervention
- 10 août 2020
- Messages postés
- 40805
- Date d'inscription
- jeudi 28 août 2003
- Statut
- Modérateur
- Dernière intervention
- 10 août 2020
26 janv. 2007 à 11:53
Ben tout dépend de ce que tu veux faire ensuite...
Si t'as un bout de code, poste-le, on essaiera d'adapter :-))
Si t'as un bout de code, poste-le, on essaiera d'adapter :-))
touf_truc
26 janv. 2007 à 12:12
- Messages postés
- 57
- Date d'inscription
- samedi 21 octobre 2006
- Statut
- Membre
- Dernière intervention
- 23 avril 2007
- Messages postés
- 40805
- Date d'inscription
- jeudi 28 août 2003
- Statut
- Modérateur
- Dernière intervention
- 10 août 2020
26 janv. 2007 à 12:12
je n'arrive pas execute certain programme shell sur Kubunto?
je le rebooter pc avec un cd (seulement pour Kubunto) il n 'est pas installé.
j'arrive seulement a executer un exemple simple pour affiche un message . mais l' autre cas non
je le rebooter pc avec un cd (seulement pour Kubunto) il n 'est pas installé.
j'arrive seulement a executer un exemple simple pour affiche un message . mais l' autre cas non
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question
je veut un programme shell qui permer de creer n fichier ce nombre etant donné par parametre et qui ont format de file0.txt , ..........
et avec taille de 0 octey
et avec taille de 0 octey
jipicy
30 janv. 2008 à 23:11
- Messages postés
- 40805
- Date d'inscription
- jeudi 28 août 2003
- Statut
- Modérateur
- Dernière intervention
- 10 août 2020
30 janv. 2008 à 23:11
lami20j
24 janv. 2007 à 21:58
- Messages postés
- 21331
- Date d'inscription
- jeudi 4 novembre 2004
- Statut
- Modérateur, Contributeur sécurité
- Dernière intervention
- 30 octobre 2019
24 janv. 2007 à 21:58
Salut,
voici un exemple (le script et le fichiers hello1.c ... hello3.c se trouvent dans le même répertoire)
voici un exemple (le script et le fichiers hello1.c ... hello3.c se trouvent dans le même répertoire)
#!/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
touf_truc
25 janv. 2007 à 11:35
- Messages postés
- 57
- Date d'inscription
- samedi 21 octobre 2006
- Statut
- Membre
- Dernière intervention
- 23 avril 2007
25 janv. 2007 à 11:35
merci pour cette exemple.
mais comment faire cette exemple on utlisant DIALOG
mais comment faire cette exemple on utlisant DIALOG
jipicy
25 janv. 2007 à 12:11
- Messages postés
- 40805
- Date d'inscription
- jeudi 28 août 2003
- Statut
- Modérateur
- Dernière intervention
- 10 août 2020
25 janv. 2007 à 12:11
Salut,
A optimisé selon tes besoins ...
A optimisé selon tes besoins ...
#!/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;-))
24 janv. 2007 à 21:37
-tout d'abrd je doit ecrire un programme shell qu' il contient un menu revient sur les tois fichier
-si je selection le fichier hello1.c
le programme shell doit compiler et executer hello1.c , c'est la meme chose pour les autres fichier 2 et 3 .c
16 janv. 2010 à 19:26
$gcc -o hello hello.c
aussi celle-ci:
$gcc hello -o hello.c
ne marche chez moi et le Shell me dit que gcc est une commande introuvable alors que fais-je pour compiler hello.c et puis l'executer et merci d'avance.
16 janv. 2010 à 19:27
16 janv. 2010 à 19:35
16 janv. 2010 à 19:41