-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathterminal_tools.txt
48 lines (39 loc) · 999 Bytes
/
terminal_tools.txt
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
38
39
40
41
42
43
44
45
46
47
48
Download Youtube videos
```
brew install youtube-dl
youtube-dl --recode-video mp4 "https://www.youtube.com/watch?v=qPgqgHnFZcY"
```
Parse JSON on Commandline
```
brew install jq
aws ec2 run-instances --image-id ami-28422647 --count 1 --instance-type t2.medium --key-name frankfurt-rancher --security-group-ids sg-a83164c5 | jq .Instances[0].InstanceId
aws ec2 describe-instances --instance-id i-0fa663fff73ba534f | jq .Reservations[0].Instances[0].PublicIpAddress
```
JSON Pretty Printer
```
brew install jsonpp
echo "{\"hello\":\"world\"}" | jsonpp
```
Trim quotes
```
echo \"hello\" | tr -d '"'
```
Cut Lists
```
echo 'how;now;brown;cow' | cut -d ';' -f 1,3,4
man cut
```
expect scripts
```
https://www.lifewire.com/linus-unix-command-expect-2201096
```
http tool: user friendly command line tool
```
brew install httpie
http google.com
```
tree - display directory structure
```
# directory level 2, ignore patter doc*, marketing, README.md
tree . -L 2 -I 'doc*|marketing|README.md'
```