Skip to content

Instantly share code, notes, and snippets.

Last active Jun 21, 2018
What would you like to do?
Find and extract hadoop root url for use in bash scripts
#!/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>/}"`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment