1
00:00:02,030 --> 00:00:05,300
Open our Scribd files don't SH

2
00:00:08,710 --> 00:00:16,690
encases that user specify some extension which doesn't exist in Targett location.

3
00:00:16,750 --> 00:00:22,910
We should print to him no file of it the debt extension found.

4
00:00:23,310 --> 00:00:33,150
So go to the bottom of our script and we need to ask if extension was specified by user.

5
00:00:34,290 --> 00:00:41,190
So if a value of variable E X T is.

6
00:00:46,010 --> 00:00:53,230
So if it is different from emptiness presens as to double quotation marks.

7
00:00:53,300 --> 00:01:02,190
So that means if a value of variable x The was not set then we need to know Clodius exit status of the

8
00:01:02,200 --> 00:01:03,180
group command.

9
00:01:03,290 --> 00:01:05,820
We did in previous lecture.

10
00:01:06,320 --> 00:01:07,310
So right.

11
00:01:07,320 --> 00:01:13,090
LS Desch L and use variable location

12
00:01:21,110 --> 00:01:30,980
and output of a dead Vitthal pass to awk program where do we sell it only regular files

13
00:01:37,220 --> 00:01:46,970
and then dead output will pass grep command where we ask if there is extension represented by a value

14
00:01:47,030 --> 00:01:48,710
of variable x the

15
00:01:54,340 --> 00:01:58,500
and of course we don't want any output on the skein.

16
00:01:58,540 --> 00:02:00,760
We want to know only exit status.

17
00:02:00,790 --> 00:02:09,290
So we need to read direct standard output and standard error to def no.

18
00:02:10,720 --> 00:02:14,800
So due to their detection to definite

19
00:02:20,660 --> 00:02:24,750
Now if exit status is not the zero

20
00:02:31,480 --> 00:02:39,900
we can try to use the debt no file with extension represented by variable x the most found

21
00:02:51,740 --> 00:02:54,110
and we can exit Scribd here.

22
00:02:54,200 --> 00:02:58,770
It exists to store because a specified extension was not found.

23
00:02:58,820 --> 00:03:01,480
And we don't have anything to count

24
00:03:04,330 --> 00:03:06,850
so exit with exits that those two

25
00:03:14,770 --> 00:03:24,880
so descript now looks good and we can test what we have just written so save it a script

26
00:03:29,670 --> 00:03:34,140
and Harami with some location and existing extension

27
00:03:47,080 --> 00:03:48,280
no error reported.

28
00:03:48,280 --> 00:03:49,570
Good.

29
00:03:49,720 --> 00:04:00,880
Now I ran with some not existing extension and NDC see no file extension conv found great.

30
00:04:00,890 --> 00:04:02,450
This is working perfectly.
