- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Executing shell commands from beeline shell
- Labels:
-
Apache Hadoop
-
Apache Hive
Created ‎10-31-2018 11:54 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is it possible to use Shell command from Beeline Shell? Just like we can use shell command from the hive as !ls or !cat. Please let me know while I am trying to use the !ls command it is not working from beeline but it works fine in the hive.
,
I have a question regarding running a shell command from beeline...As we can run Shell command from hive shell like: !ls,!cat etc.
Is it possible to run shell command from Beeline shell.....I tried but its shows undefined or unnamed syntax. Could you Please help me with this.
Created ‎11-16-2018 03:53 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, use !sh before the command. For example:
!sh ls !sh cat <filename>
Created ‎11-13-2023 04:34 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It seems to work only form command without parameters. If I define a variable by set hivevar:varname=value I cannot refer this variable. I.E !sh echo ${hivevar:varname} does not not return the string 'value' but the string '${hivevar:varaname}. Any idea to pass values to the command issued after the !sh?
Created ‎11-13-2023 05:43 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@larnone As this is an older post, we recommend starting a new thread. The new thread will provide the opportunity to provide details specific to your environment that could aid others in providing a more accurate answer to your question.
Cy Jervis, Manager, Community Program
Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.
