diff options
author | Case Duckworth | 2015-03-02 16:46:17 -0700 |
---|---|---|
committer | Case Duckworth | 2015-03-02 16:46:17 -0700 |
commit | b5f04621a188ffd07463d66c233601a32e970f11 (patch) | |
tree | 75c85f12a99057b73a938337ee425f46bdb99e30 /src/nolink.sh | |
parent | Touch css/* (diff) | |
download | autocento-b5f04621a188ffd07463d66c233601a32e970f11.tar.gz autocento-b5f04621a188ffd07463d66c233601a32e970f11.zip |
First complete src/ linking complete
Diffstat (limited to 'src/nolink.sh')
-rw-r--r-- | src/nolink.sh | 14 |
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 | |||
3 | unlinks=( $(grep -L '\[.*\]\[.*\]' *) ) | ||
4 | total_things=$(ls | wc -l) | ||
5 | |||
6 | if [[ -n $1 && $1 == "-l" ]]; then | ||
7 | echo ${unlinks[@]} | tr ' ' '\n' | ||
8 | else | ||
9 | echo "${unlinks[$((RANDOM %= $((${#unlinks[@]}))))]}" | ||
10 | echo "(${#unlinks[@]} of $total_things still to link.)" | ||
11 | fi | ||
12 | |||
13 | |||
14 | #[no link][] | ||