-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathpr.sh
More file actions
50 lines (25 loc) · 669 Bytes
/
pr.sh
File metadata and controls
50 lines (25 loc) · 669 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
38
39
40
41
42
43
44
45
46
47
48
49
pr greeting.txt | head
## Columnate
seq 9 | pr -3t
seq 9 | pr -3ts
seq 9 | pr -3ts,
seq 9 | pr -3ts' : '
seq 8 | pr -4ats:
seq 10 | pr -4ats,
seq 10 | paste -d, - - - -
## Customizing page width
seq 100 | pr -50ats,
pr -w6 -2ts, greeting.txt
pr -J -w6 -2ts, greeting.txt
seq 6 | pr -J -w10 -3ats'::::'
seq 6 | pr -J -w11 -3ats'::::'
seq 6 | pr -J -w500 -3ats'::::'
## Concatenating files column wise
pr -mts colors_1.txt colors_2.txt
pr -mts' : ' <(seq 3) <(seq 4 6)
pr -n:1 -mts, colors_1.txt colors_2.txt
pr -mts$'\n' greeting.txt fruits.txt
## Miscellaneous
pr -dt fruits.txt
printf 'car\bt\r\nbike\0p\r\n' | pr -vt
printf 'a\nb\nc' | pr -t