Support Questions

Find answers, ask questions, and share your expertise

is there any way to print or read PIG_HOME through terminal

avatar
Expert Contributor

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

1 ACCEPTED SOLUTION

avatar
Master Guru

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

avatar
Master Guru

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.

avatar
Expert Contributor

@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 "$@"