Created
October 14, 2014 11:36
-
-
Save nathanielanozie/7b0e567cb9dfd583a27b to your computer and use it in GitHub Desktop.
select all cluster in all selected roots
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
//select all cluster in all selected roots | |
//Author: Nathaniel Anozie (ogbonnawork at gmail dot com) | |
//nathananozie dot blogspot dot com | |
global proc na_selectClusterOfHierarchy(){ | |
string $result[] = {}; | |
string $sel[] = `ls -sl`; | |
for($arg in $sel){ | |
string $past[] = {}; | |
$past =`listConnections $arg`; | |
string $hist[] = `ls -type cluster $past`;//cluster history | |
if(size($hist) == 1){ $result = stringArrayCatenate($result, $hist);//save it | |
}else{} | |
}//end loop | |
$result = stringArrayRemoveDuplicates($result); | |
select -r $result; | |
} | |
na_selectClusterOfHierarchy(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment