I'm looking for the command to enter first found
foo-something directory like:
but without using wildcard (or other special shell characters).
As part of the remote drush build script, I'm trying to find the way of entering folder which folder name could change, but it has common prefix. Same example:
drush -y dl ads or
drush -y dl ads --dev downloads either
ls * is escaped into
ls '\''*'\''' and ending up with
Command ls '*' failed. error.
I've tried also using
find, but I can't use
-exec primary, because semicolon needs to be escaped, and drush is double escaping it into (
Therefore I'm looking to enter
foo-* folder without using wildcard (or any other special characters, parameter expansion, command substitution, arithmetic expansion, etc.) if possible.
I believe the logic of shell escaping is here and it is intended to work the same way that
escapeshellarg() does on Linux. What it does, it's escaping each parameter.