aboutsummaryrefslogtreecommitdiffstats
path: root/config/examples.sh.sample
blob: fffb4d48ada1f0764e4036281059f7f68fc1d3fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/bash

# each array element will be an example code snippet
# code must be preceded by a tag, followed by a ':' and a newline

_examples=(

'example tag:
echo "example command"'

'example tag:
printf "%s\n" "this is a second example tag example"'

'example tag:
printf "%s\n" good for measure another | sort'

'a different tag:
echo "did you notice the tag above along with its adjacency indicators (+) ?"'

'a different tag:
uniq \
    <(sort \
        <(printf "%s\n" "${_examples[@]//:$'\n'*/}") )'

)