forked from hjacobs/python-clickclick
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.sh
More file actions
executable file
·37 lines (28 loc) · 700 Bytes
/
Copy pathexample.sh
File metadata and controls
executable file
·37 lines (28 loc) · 700 Bytes
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
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/bash
set -x
# Print Usage
./example.py
# Print Message 'too many matches'
./example.py l
# Print Localtime
./example.py lo
# Print listing with multiple outputformats
./example.py li
./example.py li -o tsv
./example.py li -o json
./example.py li -o yaml
# Print Action messages
./example.py work-
# print Choice prompt
echo 2 | ./example.py work_ 15.4
echo 3 | ./example.py work_ 15.4
echo | ./example.py work_ 15.4
# redirect output
echo 2 | ./example.py work_ 15.4 >/dev/null
echo 3 | ./example.py work_ 15.4 >/dev/null
# Print Action messages with multiple output format
./example.py output
./example.py output -o tsv
./example.py output -o json
./example.py output -o yaml
exit 0