summary refs log tree commit diff stats
path: root/src/nolink.sh
diff options
context:
space:
mode:
authorCase Duckworth2015-03-02 16:46:17 -0700
committerCase Duckworth2015-03-02 16:46:17 -0700
commitb5f04621a188ffd07463d66c233601a32e970f11 (patch)
tree75c85f12a99057b73a938337ee425f46bdb99e30 /src/nolink.sh
parentTouch css/* (diff)
downloadautocento-b5f04621a188ffd07463d66c233601a32e970f11.tar.gz
autocento-b5f04621a188ffd07463d66c233601a32e970f11.zip
First complete src/ linking complete
Diffstat (limited to 'src/nolink.sh')
-rw-r--r--src/nolink.sh14
1 files changed, 14 insertions, 0 deletions
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 @@
1#!/bin/bash
2
3unlinks=( $(grep -L '\[.*\]\[.*\]' *) )
4total_things=$(ls | wc -l)
5
6if [[ -n $1 && $1 == "-l" ]]; then
7 echo ${unlinks[@]} | tr ' ' '\n'
8else
9 echo "${unlinks[$((RANDOM %= $((${#unlinks[@]}))))]}"
10 echo "(${#unlinks[@]} of $total_things still to link.)"
11fi
12
13
14#[no link][]