Bonjour tout le monde!
j'ai un petit soucis concernant ce petit script :
j'ai comme résultatCode:
1
2
3
4
5
6
7 #!/bin/sh ligne='toto ;titi ; tata ; michael ' lng=`echo $1 | awk '{ print length($0); }'` prefixe=`echo $ligne | tr -s ' ' | cut -c3-$lng` echo $prefixe
alors que je voudrais avoir plutôt ça :Code:to ;titi ; tata ; michael
sans les espaces.Code:toto;titi;tata;michael
Si quelqu'un a une suggestion je suis toute ouïe !
Merci :)