@@ -24,13 +24,13 @@ cat file1 file2 ...
24
24
3 . To create a file with the cat command:
25
25
26
26
```
27
- cat > filename
27
+ cat > file_name
28
28
```
29
29
30
30
4 . To display all files in current directory with the same filetype:
31
31
32
32
```
33
- cat *.txt
33
+ cat *.<filetype>
34
34
```
35
35
36
36
5 . To display the content of all the files in current directory:
42
42
6 . To put the output of a given file into another file:
43
43
44
44
```
45
- cat oldfile > newfile
45
+ cat old_file_name > new_file_name
46
46
```
47
47
7 . Use cat command with ` more ` and ` less ` options:
48
48
@@ -51,22 +51,22 @@ cat filename | more
51
51
cat filename | less
52
52
```
53
53
54
- 8 . Append the contents of file1.txt to file2.txt :
54
+ 8 . Append the contents of file1 to file2:
55
55
56
56
```
57
- cat file1.txt >> file2.txt
57
+ cat file1 >> file2
58
58
```
59
59
60
60
9 . To concatenate two files together in a new file:
61
61
62
62
```
63
- cat file1.txt file2.txt merge.txt
63
+ cat file1_name file2_name merge_file_name
64
64
```
65
65
66
66
10 . Some implementations of cat, with option -n, it's possible to show line numbers:
67
67
68
68
```
69
- cat -n file1.txt file2.txt > newnumberedfile.txt
69
+ cat -n file1_name file2_name > new_numbered_file_name
70
70
```
71
71
72
72
@@ -114,15 +114,15 @@ tac <specified_file_name>
114
114
2 . This option attaches the separator before instead of after.
115
115
116
116
```
117
- tac -b concat.txt tacexample.txt
117
+ tac -b concat_file_name tac_example_file_name
118
118
```
119
119
3 . This option will interpret the separator as a regular expression.
120
120
```
121
- tac -r concat.txt tacexample.txt
121
+ tac -r concat_file_name tac_example_file_name
122
122
```
123
123
4 . This option uses STRING as the separator instead of newline.
124
124
```
125
- tac -s concat.txt tacexample.txt
125
+ tac -s concat_file_name tac_example_file_name
126
126
```
127
127
128
128
5 . This option will display the help text and exit.
0 commit comments