Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[bash] poser une question a l'utilisateur (résolu)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index French
View previous topic :: View next topic  
Author Message
SnowBear
l33t
l33t


Joined: 03 Sep 2005
Posts: 773
Location: France - Bordeaux

PostPosted: Sat Jan 14, 2006 9:03 am    Post subject: [bash] poser une question a l'utilisateur (résolu) Reply with quote

Bonjour,
toujours dans le but de créer ma fonction,
je cherche un moyen de poser une question a l'utilisateur et ensuite stocker sa réponse dans une variable.

Je n'arrive plus a remettre la main sur le document que j'avais dans lequel il y avait justement cet exemple :s

Pouvez vous m'aider ?

Par ailleurs connaissez vous des sites qui expliquent bien la programmation bash ? (je viens de me commander un livre, mais je ne l'ai pas encore reçu donc...)


Merci d'avance.


Last edited by SnowBear on Sat Jan 14, 2006 9:46 am; edited 1 time in total
Back to top
View user's profile Send private message
netfab
Veteran
Veteran


Joined: 03 Mar 2005
Posts: 1902
Location: 127.0.0.1

PostPosted: Sat Jan 14, 2006 9:21 am    Post subject: Reply with quote

Salut,

Code:
echo 'Voulez-vous continuer ?'
read reponse

echo $reponse

Je ne connais pas de site particulier pour le bash. On trouve des cours pour débuter un peu partout (comme sur lea), mais sans plus.
Back to top
View user's profile Send private message
billiob
Guru
Guru


Joined: 30 Dec 2004
Posts: 425
Location: Paris, France

PostPosted: Sat Jan 14, 2006 9:22 am    Post subject: Reply with quote

(extrait de http://lea-linux.org/cached/index/Dev-shell_script.html#Saisir_la_valeur_d.27une_variable )
Code:
echo -n "Entrez votre prénom : "
read prenom


EDIT : Grillé :(
_________________
billiob
Back to top
View user's profile Send private message
SnowBear
l33t
l33t


Joined: 03 Sep 2005
Posts: 773
Location: France - Bordeaux

PostPosted: Sat Jan 14, 2006 9:34 am    Post subject: Reply with quote

Merci ;)
Back to top
View user's profile Send private message
Talosectos
Guru
Guru


Joined: 31 Aug 2004
Posts: 329
Location: Bugey-Libre

PostPosted: Sat Jan 14, 2006 11:41 am    Post subject: Reply with quote

Pour en savoir plus sur bash, tu peux installer abs-guide (dans portage)
Quote:
* app-doc/abs-guide
Latest version available: 3.7
Latest version installed: [ Not Installed ]
Size of downloaded files: 772 kB
Homepage: http://www.tldp.org/LDP/abs/html
Description: An advanced reference and a tutorial on bash shell scripting
License: OPL

Accessible aussi en ligne http://www.tldp.org/LDP/abs/html.
_________________
Comité de lutte contre le language sms et les fautes volontaires
Utilisez la fonction recherche !
Back to top
View user's profile Send private message
SnowBear
l33t
l33t


Joined: 03 Sep 2005
Posts: 773
Location: France - Bordeaux

PostPosted: Sat Jan 14, 2006 1:17 pm    Post subject: Reply with quote

Ok,
merci bien ;)
Back to top
View user's profile Send private message
ghoti
Advocate
Advocate


Joined: 30 Dec 2002
Posts: 3634
Location: Belgium

PostPosted: Sat Jan 14, 2006 1:33 pm    Post subject: Reply with quote

Talosectos wrote:
Pour en savoir plus sur bash, tu peux installer abs-guide (dans portage)
Quote:
* app-doc/abs-guide
Latest version available: 3.7
Latest version installed: [ Not Installed ]
Size of downloaded files: 772 kB
Homepage: http://www.tldp.org/LDP/abs/html
Description: An advanced reference and a tutorial on bash shell scripting
License: OPL

Accessible aussi en ligne http://www.tldp.org/LDP/abs/html.

Le même en français, quoique la version soit plus ancienne : http://www.bsdbooks.net/shells/scripting/fr/
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index French All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum