[bash linux] etendre $0 en chemin d'acces
Fermé
santiago69
Messages postés
477
Date d'inscription
mercredi 7 mars 2001
Statut
Membre
Dernière intervention
12 septembre 2016
-
27 mai 2008 à 12:18
dubcek Messages postés 18724 Date d'inscription lundi 15 janvier 2007 Statut Contributeur Dernière intervention 15 mai 2024 - 27 mai 2008 à 13:07
dubcek Messages postés 18724 Date d'inscription lundi 15 janvier 2007 Statut Contributeur Dernière intervention 15 mai 2024 - 27 mai 2008 à 13:07
A voir également:
- [bash linux] etendre $0 en chemin d'acces
- Etendre ecran pc - Guide
- Chaque fichier en ligne sur le web a un chemin d’accès sur un serveur. ✓ - Forum Réseau
- List bash ✓ - Forum Shell
- Acces rapide - Guide
- Émulateur linux ✓ - Forum Linux / Unix
3 réponses
macgawel
Messages postés
664
Date d'inscription
mercredi 7 mai 2008
Statut
Membre
Dernière intervention
1 novembre 2008
89
27 mai 2008 à 12:27
27 mai 2008 à 12:27
Bonjour.
Tu peux essayer :
repertoire=$(pwd)
Tu peux essayer :
repertoire=$(pwd)
santiago69
Messages postés
477
Date d'inscription
mercredi 7 mars 2001
Statut
Membre
Dernière intervention
12 septembre 2016
209
27 mai 2008 à 12:30
27 mai 2008 à 12:30
pas exactement : la commande pwd renvoi le chemin courant.
or ce dont j'ai besoin, c'est le chemin du script en cours.
merci quand meme
santiago
or ce dont j'ai besoin, c'est le chemin du script en cours.
merci quand meme
santiago
macgawel
Messages postés
664
Date d'inscription
mercredi 7 mai 2008
Statut
Membre
Dernière intervention
1 novembre 2008
89
27 mai 2008 à 12:44
27 mai 2008 à 12:44
C'est vrai... :-O
Il y a peut-être (certainement) plus simple, mais ça marche !
Il y a peut-être (certainement) plus simple, mais ça marche !
cd $(dirname $0) rep=$(pwd) cd -
dubcek
Messages postés
18724
Date d'inscription
lundi 15 janvier 2007
Statut
Contributeur
Dernière intervention
15 mai 2024
5 615
27 mai 2008 à 13:07
27 mai 2008 à 13:07
hello
et avec
whereis $(basename $0)
et avec
whereis $(basename $0)