Trying to pass variable to shell script

I'm trying to pass a variable into a shell script, seen the examples, but still don't succeed... The variable remains empty inside the script. Must be simple what I'm doing wrong!

Test shell script with variable.kmmacros (2.4 KB)

Result gives me:
Screenshot 2024-01-20 at 10.24.52

Any help much appriciated!

I've just tried it out using your variable names etc. and it's working for me. Click on the little down arrow to the left of your script and make sure you have "Include All Variables" selected...

Screenshot 2024-01-20 at 09.55.59

Edited to add: I've just noticed that you included the macro in your post, so I downloaded it and it is set to "Include No Variables", so I'm pretty sure that's your problem...

2 Likes

If you remove the final pwd line, do you see an error message in the displayed results ?

Ah, yes, that's it. I had missed that little arrow!

Thanks a lot!