recentpopularlog in

kme : braceexpansion   3

shell - Generating permutations using bash - Stack Overflow - http://stackoverflow.com/
perm() {
local items="$1"
local out="$2"
local i
[[ "$items" == "" ]] && echo "$out" && return
for (( i=0; i<${#items}; i++ )) ; do
perm "${items:0:i}${items:i+1}" "$out${items:i:1}"
done
}
while read line ; do perm $line ; done < File
bash  braceexpansion  permutations  solution  scripting 
november 2015 by kme

Copy this bookmark:





to read