クエリ内のいくつかの文字列を次のようなものに置き換えたい:
URL="sub.domain.tld" mysql -A --user=username --password="password" --host=hostname usernameuction -e "update core_config_data SET value = 'http://${URL}/' WHERE path LIKE 'web/unsecure/base_url'; update core_config_data SET value = 'https://${URL}/' WHERE path LIKE 'web/secure/base_url';"
これを機能させるためにエクスポートを追加する必要があることを除いて、これはほぼ完全に機能します。
export URL="sub.domain.tld"; mysql -A --user=username --password="password" --host=hostname usernameuction -e "update core_config_data SET value = 'http://${URL}/' WHERE path LIKE 'web/unsecure/base_url'; update core_config_data SET value = 'https://${URL}/' WHERE path LIKE 'web/secure/base_url';"
bashまたはzshで引用されているコマンドと同じ行にvarを保持しながら、エクスポートなしでこれを機能させるにはどうすればよいですか?