Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
このコマンドを実行しようとすると、次のエラーが発生します。
指示:
$(mysql -u root -proot -e 'show databases;') > dbnames
エラー:
Database: command not found
$( mysql -u ... )コマンドの結果に評価されmysqlます。この例では、その文字列は実行するコマンドとして扱われるため、実行を試みるのと同じです。
$( mysql -u ... )
mysql
$ Databases > dbnames Databases: command not found
mysql次のコマンドを実行するだけです。
mysql -u root -proot -e 'show databases;' > dbnames