Support Questions
Find answers, ask questions, and share your expertise

is there any way to print or read PIG_HOME through terminal

Solved Go to solution
Highlighted

is there any way to print or read PIG_HOME through terminal

Rising Star

I would like to print or read pig_home from terminal.Is there any way???

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: is there any way to print or read PIG_HOME through terminal

I assume you are using HDP? In that case PIG_HOME is set when executing the pig command. If you cat /usr/bin/pig you can find the line export PIG_HOME=${PIG_HOME:-/usr/hdp/2.3.2.0-2950/pig}. So you could run this manually.

View solution in original post

2 REPLIES 2
Highlighted

Re: is there any way to print or read PIG_HOME through terminal

I assume you are using HDP? In that case PIG_HOME is set when executing the pig command. If you cat /usr/bin/pig you can find the line export PIG_HOME=${PIG_HOME:-/usr/hdp/2.3.2.0-2950/pig}. So you could run this manually.

View solution in original post

Re: is there any way to print or read PIG_HOME through terminal

Rising Star

@Benjamin Leonhardi

Thank you.Yeah,The script setting the environmental variable and then executing pig script in $PIG_HOME like

exec /usr/hdp/2.2.8.0-3150/pig/bin/pig.distro "$@"