You are on page 1of 3

[root@localhost ~]# vim test

[root@localhost ~]# vim test


[root@localhost ~]# ./test
bash: ./test: Permission denied
[root@localhost ~]# chmod u+x test
[root@localhost ~]# ./test
right choice
[root@localhost ~]# echo hello |tr 'a-z' 'A-Z'
HELLO
[root@localhost ~]# echo hello |tr -s 'a-z' 'A-Z'
HELO
[root@localhost ~]# echo hello |tr -s 'a-z' 'A-Z'
HELO
[root@localhost ~]# echo hellol |tr -s 'a-z' 'A-Z'
HELOL
[root@localhost ~]# tr -d "tycs" <<EOF
> Bscit
> Bcom
> TYCS
> EOF
[root@localhost ~]# tr -d "tycs" <<EOF
> BSCit
> tycs
> EOf
>
>
>
[root@localhost ~]# tr -d "tycs" <<EOF
> Bscit
> bcom
> tycs
> EOF
Bi
bom
[root@localhost ~]# cat > file1
1|mehul|borivali|1234
2|sujit|malad|2345
3|naina|kandivali|4567
[root@localhost ~]#
[root@localhost ~]# vim file1
[root@localhost ~]# split -l 3 file1 f
[root@localhost ~]# cat faa
1|mehul|borivali|1234
2|sujit|malad|2345
12|mehu2l|borivalie|12345
[root@localhost ~]# cat fab
13|mehul3|borivaliw|12346
14|mehul4|borivalin|12347
15|mehul5|borivalis|12348
[root@localhost ~]# split -b 3 file1 f
[root@localhost ~]# cat faa
[root@localhost ~]# split -a 3 -l 3 file1 f
[root@localhost ~]# cat faaa
1|mehul|borivali|1234
2|sujit|malad|2345
12|mehu2l|borivalie|12345
[root@localhost ~]# od -b file1
0000000 061 174 155 145 150 165 154 174 142 157 162 151 166 141 154 151
0000020 174 061 062 063 064 012 062 174 163 165 152 151 164 174 155 141

0000040 154 141 144 174 062 063 064


0000060 062 154 174 142 157 162 151
0000100 064 065 012 061 063 174 155
0000120 151 166 141 154 151 167 174
0000140 155 145 150 165 154 064 174
0000160 174 061 062 063 064 067 012
0000200 174 142 157 162 151 166 141
0000220 012
0000221
[root@localhost ~]# echo "MEHUL"|od
0000000 042515 052510 005114
0000006
[root@localhost ~]# cmp faa fab
faa fab differ: byte 1, line 1
[root@localhost ~]# comm faa fab
1|m
ehu
[root@localhost ~]# cat faa
1|m[root@localhost ~]# cat >> fafa
sujit1231
mehul121
navin56787
fdg
dgdfhryyd
[root@localhost ~]# comm faa fafa
1|m
sujit1231
mehul121
navin56787
fdg
[root@localhost ~]# cat > f1
manoj
mehul
sukit
[root@localhost ~]# cat > f2
tanvi
mehul
sasa
[root@localhost ~]#
[root@localhost ~]# comm f1 f2
manoj
mehul
tanvi
mehul
[root@localhost ~]# sort f1
manoj
mehul
[root@localhost ~]# sort f2
mehul
tanvi
[root@localhost ~]# comm f1 f2
manoj
mehul
tanvi
mehul
[root@localhost ~]# cat > f3
mehul
navin
ruma
[root@localhost ~]# comm f1 f3

065
166
145
061
142
061
154

012
141
150
062
157
065
151

061
154
165
063
162
174
163

062
151
154
064
151
155
174

174
145
063
066
166
145
061

155
174
174
012
141
150
062

145
061
142
061
154
165
063

150
062
157
064
151
154
064

165
063
162
174
156
065
070

manoj
mehul
navin
[root@localhost ~]# diff f1 f2
1c1
< manoj
--> tanvi
You have mail in /var/spool/mail/root
[root@localhost ~]# cut -c 4-10 file1
ehul|bo
ujit|ma
mehu2l|
mehul3|
mehul4|
mehul5|
[root@localhost ~]# cut -d "|" -f -2.4- f23
cut: invalid byte, character or field list
Try `cut --help' for more information.
[root@localhost ~]# cut -d "|" -f -2.4- file1
cut: invalid byte, character or field list
Try `cut --help' for more information.
[root@localhost ~]# cut -d "|" -f -2,4- file1
1|mehul|1234
2|sujit|2345
12|mehu2l|12345
13|mehul3|12346
14|mehul4|12347
15|mehul5|12348
[root@localhost ~]# cut -b 4 file1
e
u
m
m
m
m
[root@localhost ~]#

You might also like