Yes, we can run UNIX shell commands from Hive using an '!' mark before the command. For example, !pwd at Hive prompt will display the current directory.
We can execute Hive queries from the script files using the source command.
Example:
Hive> source /path/to/file/file_with_query.hql