Last active
June 21, 2018 05:07
-
-
Save ixaxaar/497fdfe6782ed368640999f270cd70e2 to your computer and use it in GitHub Desktop.
Find and extract hadoop root url for use in bash scripts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
HH=`awk '/fs\.defaultFS/{getline; print}' /etc/hadoop/conf/core-site.xml ` | |
HH1=`echo "${HH/<value>/}"` | |
HADOOP_ROOT=`echo "${HH1/<\/value>/}"` | |
echo $HADOOP_ROOT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment