usage: hive -d,--define <key=value> Variable substitution to apply to Hive commands. e.g. -d A=B or --define A=B --database <databasename> Specify the database to use -e<quoted-query-string> SQL from commandline -f<filename> SQL from files -H,--helpPrinthelp information --hiveconf <property=value> Use value for given property --hivevar <key=value> Variable substitution to apply to Hive commands. e.g. --hivevar A=B -i <filename> Initialization SQL file -S,--silent Silent mode in interactive shell -v,--verbose Verbose mode (echo executed SQL to the console)
1 2 3 4 5 6 7
# -e <quoted-query-string> SQL from command line # -e 后为sql bin/hive -e "show databases;"