Created 10-31-2018 11:54 AM
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
Yes, use !sh before the command. For example:
!sh ls !sh cat <filename>
Created 11-13-2023 04:34 AM
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
@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.