Skip to content

Instantly share code, notes, and snippets.

@Hullaballo2001
Last active September 15, 2021 07:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Hullaballo2001/1c9af77b8728698c6619b254cc2aafb9 to your computer and use it in GitHub Desktop.
Save Hullaballo2001/1c9af77b8728698c6619b254cc2aafb9 to your computer and use it in GitHub Desktop.
first script ever
# Quel shell on utilise
#!/bin/bash
# Prompt username
read -p 'Quel est ton nom, étranger ?' -t 10 nom
# Si pas de reponse dans les 10 sec, on prend le $user
if [ -z $nom ]
then nom=$USER
fi
#Afficher msg poli sur une nouvelle ligne
echo -e "\nBonjour $nom !"
exit
@Hullaballo2001
Copy link
Author

ajouté le $ devant USER ^^ merci max

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment