|
|
|
|
Posté par
JOBiJOBa2, le vendredi 16 mai 2008 à 16:21:58Configuration: Windows XP Firefox 2.0.0.14
Salut, [tmpfs]$ var="home/to/titi.exe"
[tmpfs]$ echo ${var##*/}
titi.exe
[tmpfs]$;-))
JP - Éleveur de pingouins - Faites un geste pour l'environnement, fermez vos fenêtres et adoptez un manchot.
|
Quel langage?
|
Non, c'est la meilleure soluce |
echo ${var//*\//}
JP - Éleveur de pingouins -
Faites un geste pour l'environnement, fermez vos fenêtres et adoptez un manchot.
|
Salut,
allez un peu d'économie ;-) root@debian:~# var="home/to/titi.exe"
root@debian:~# echo $var
home/to/titi.exe
root@debian:~# echo ${var/*\/}
titi.exe
106485010510997108
|
Chez ça marche avec ksh
$ echo $SHELL
/bin/ksh
$ var="home/to/titi.exe"
$ echo $var
home/to/titi.exe
$ echo ${var/*\/}
titi.exe
$
106485010510997108 |
| 17/11 11h21 | [Shell] Tester une variable numérique | Shell |
| 12/03 13h58 | Le remplacement de variables en shell Bash | Bash |
| 09/04 19h49 | Passer le son de l'ordi sur une chaîne hi-fi | Carte son |
| 08/11 22h53 | [Shell] Transferer des fichiers via ssh | Shell |
| 14/11 11h46 | [Shell] Accès aux dernières commandes de l'historique | Shell |
| 27/05 13h33 | [Shell] Extraction chaîne caractère | 7 |
| 27/04 19h50 | Manipulation chaine de caractere | 11 |
| 15/11 13h52 | Shell ->Trie chaine de caractère et insertion | 15 |
| 21/12 08h05 | [manipulation textes] perl vs python vs shell | 2 |
![]() | SSH Secure Shell - SSH secure shell for workstations est un client SSH flexible permettant de se connecter de façon sécurisée à des... | Catégorie: Telnet/SSH Licence: Open Source |
![]() | ShellEnhancer - ShellEnchancer est un programme d'amélioration des fonctions de base de Windows. Il rend les interfaces plus stables et plus... | Catégorie: Personnalisation Licence: Freeware/gratuit |
![]() | Gant2Ocean ShellPack - Pour ceux qui aiment bien personnaliser l'apparence de leur interface graphique Windows ou Thèmes, ils seront gâtés. ... | Catégorie: Personnalisation Licence: Freeware/gratuit |
![]() | CygWin - Cygwin est un environnement UNIX pour Windows composé: d'un shell Unix d'une librairie dynamique (DLL) chargée de... | Catégorie: Développement Licence: Open Source |
![]() | Shellshock: Nam 67 | Catégorie: Jeu vidéo Xbox | 3.00 € Micromania |
![]() | Kingdom Hearts : Chain | Catégorie: Jeu vidéo Gameboy Advance | 34.45 € Amazon.fr |
![]() | M and M's Shell | Catégorie: Jeu Playstation | |
![]() | God of War: Chains | Catégorie: Jeu vidéo PSP | 34.95 € Rue du Commerce |