Salut à tous et toutes,
l'AppleScript s'exécute dans un flux Automator
j'ai un script qui marche très bien, incluant une expression régulières comme ceci :
set rere to find text "[0-9]+([[.]-,_ ])?([0-9])?+([x_-])?+([_ ])?+[0-9]+([_ ])?+([[.]-,_ ])?+([0-9])?+[x_-]([_ ])?+[0-9]+([[.]-,_ ])?([0-9])?" in minuDecB with regexp, string result and all occurrences
voulant la portée vers un do shell script,
j'obtiens un test qui fonctionne dans le terminal, comme ceci :
echo "pierre xxxx:100x34x140 4783:" | grep -Eo '[0-9]+([-/.,_ ])?([0-9])?([x_-])?([_ ])?[0-9]+([_ ])?([-/.,_ ])?([0-9])?[x_-]([_ ])?[0-9]+([-/.,_ ])?([0-9])?'
mais
dés que le script est inclus dans Automator,
1 2
| set thecommandstring to "echo \"" & minuDecB & "\" | grep -Eo \"[0-9]+([-/.,_ ])?([0-9])?([x_-])?([_ ])?[0-9]+([_ ])?([-/.,_ ])?([0-9])?[x_-]([_ ])?[0-9]+([-/.,_ ])?([0-9])?\"" as string
set rere to do shell script thecommandstring |
dans une boucle repeat, ça beugue :
la commande s'est arrêtée avec un état non nul.
Quelqu'un connais cette erreur ?
merci de votre aide
--
Cordialement
Partager