compute/one-liners.md
... ...
@@ -4,6 +4,10 @@
4 4
Only if you trust your environment, mind.
5 5
`eval $(env | grep -i http | sed 's/^/unset /; s/=.*//')`
6 6
7
+### Join a bash array on a character
8
+Watch the quotes in the echo. Only works for single character joins.
9
+`PATH="$(IFS=: ; echo "${PATHS[*]}")"`
10
+
7 11
### Core Count
8 12
`cat /proc/cpuinfo | egrep "core id|physical id" | tr -d "\n" | sed s/physical/\\nphysical/g | grep -v ^$ | sort | uniq | wc -l`
9 13