1
00:00:00,640 --> 00:00:06,420
In this lecture We'll talk about how to count for size using our program.

2
00:00:06,570 --> 00:00:14,970
I will switch to eat this directory as there are many files I can print the content of directory using

3
00:00:15,040 --> 00:00:25,280
ls l command record files are starting with Desch in the first column.

4
00:00:25,380 --> 00:00:31,850
Things are starting with our character and directories starting with letter D.

5
00:00:33,800 --> 00:00:35,460
So leakin using that.

6
00:00:35,460 --> 00:00:43,440
No separate files from links and directories.

7
00:00:43,720 --> 00:00:46,440
So now let's print only file I was using.

8
00:00:46,500 --> 00:00:48,110
Command C'mon.

9
00:00:48,340 --> 00:00:53,910
So in our search pattern we will use a regular expression for starting with Desch

10
00:01:03,430 --> 00:01:07,070
and we see only regler files listed here.

11
00:01:07,160 --> 00:01:07,560
Great

12
00:01:14,510 --> 00:01:23,810
now we would like to display files of specific extension so we are using pipe up out both of our previous

13
00:01:23,810 --> 00:01:33,730
command as an input into another awk program that will search for files ending with extension dot com.

14
00:01:36,210 --> 00:01:43,470
Don't forget to use backslash before dot revise dot would be represented as any character and not as

15
00:01:43,530 --> 00:01:50,450
edit and visi only files with conflict engine.

16
00:01:51,270 --> 00:01:58,220
Now try to use some extension which doesn't exist.

17
00:01:58,220 --> 00:02:01,960
We don't see an output printed but vote is an exit status

18
00:02:09,450 --> 00:02:11,250
it is zero even awk.

19
00:02:11,270 --> 00:02:13,460
Didn't find anything.

20
00:02:13,800 --> 00:02:21,030
But in our script it would be good to know according to exit status if some extension was found or not

21
00:02:21,840 --> 00:02:26,360
for that reason we can use grep command.

22
00:02:26,480 --> 00:02:30,890
So just rename and remove slushes

23
00:02:41,990 --> 00:02:45,320
we don't see any output printed and exit status.

24
00:02:45,320 --> 00:02:48,220
Is it this number one good.

25
00:02:48,320 --> 00:02:54,280
So that means that if grep didn't find bottom biddable exit with a non-zero status.

26
00:02:54,280 --> 00:02:59,840
Now just for being sure let's search using gap for extension that exists.

27
00:03:00,890 --> 00:03:04,510
And now check exits tattles.

28
00:03:04,790 --> 00:03:05,880
Now it is zero.

29
00:03:05,960 --> 00:03:06,580
Great.

30
00:03:06,710 --> 00:03:08,250
So using grep.

31
00:03:08,390 --> 00:03:13,210
If he can tell if extension exists or not in specific location.
