Create a new file using the "cat" command (you can even use the editor). Write down all the queries you want to execute inside the file
$cat > MyQueries.hql query1 query2 . . Ctrl+D
Note: .hql or .q is not required. It is simple for our reference to determine that this is a request (file) for bushes.
You can execute all the requests inside the file at a time using
$hive -f MyQueries.hql
source share