From b5f04621a188ffd07463d66c233601a32e970f11 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Mon, 2 Mar 2015 16:46:17 -0700 Subject: First complete src/ linking complete --- src/nolink.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/nolink.sh (limited to 'src/nolink.sh') diff --git a/src/nolink.sh b/src/nolink.sh new file mode 100644 index 0000000..b4d6c3e --- /dev/null +++ b/src/nolink.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +unlinks=( $(grep -L '\[.*\]\[.*\]' *) ) +total_things=$(ls | wc -l) + +if [[ -n $1 && $1 == "-l" ]]; then + echo ${unlinks[@]} | tr ' ' '\n' +else + echo "${unlinks[$((RANDOM %= $((${#unlinks[@]}))))]}" + echo "(${#unlinks[@]} of $total_things still to link.)" +fi + + +#[no link][] -- cgit 1.4.1-21-gabe81