- 🇦🇺Australia silverham
For those who find this via Search engines, you can pipe to `drush php-eval` like follows, depending on what style you like in bash.
read -r -d '' DRUSH_TEMP_COMMAND <<'EOF'; ./vendor/bin/drush php-eval "$DRUSH_TEMP_COMMAND" var_dump(\Drupal::service('file_system')->getTempDirectory()); var_dump("TEST2"); EOF
OR
DRUSH_TEMP_COMMAND=$(cat <<'END' var_dump(\Drupal::service('file_system')->getTempDirectory()); var_dump("TEST"); END ); ./vendor/bin/drush php-eval "$DRUSH_TEMP_COMMAND"
@see https://stackoverflow.com/questions/2500436/how-does-cat-eof-work-in-bas...
@see https://stackoverflow.com/questions/1167746/how-to-assign-a-heredoc-valu...