WEBVTT

00:00.000 --> 00:08.000
Thank you for all right, thank you for your parations,

00:08.000 --> 00:14.000
everybody. Hi, my name is Luna. I'm here because I love documentation,

00:14.000 --> 00:19.000
the command drawing, and the first them are equally.

00:19.000 --> 00:24.000
So this is like everything I love, all the number you're over here, everything is wonderful.

00:24.000 --> 00:28.000
We started a bit right and I already have massively too much content,

00:28.000 --> 00:32.000
so this is going to be amazing.

00:32.000 --> 00:36.000
Thank you for joining me on this adventure.

00:36.000 --> 00:40.000
So, now I'm continuing to talk about the command drawing.

00:40.000 --> 00:46.000
It's not new, it's not sexy, but it's a tool that I come out live without

00:46.000 --> 00:51.000
in my documentation projects. My background is in software engineering.

00:51.000 --> 00:54.000
I've been a Linux user for many years.

00:54.000 --> 00:56.000
I run just with this up front.

00:56.000 --> 00:58.000
I am a good user.

00:58.000 --> 01:00.000
I am not sorry.

01:00.000 --> 01:04.000
But I really think the command drawing has helped me enormously,

01:04.000 --> 01:08.000
and I'm going to share a little bit of this with you.

01:08.000 --> 01:12.000
If you are new to the command line, great.

01:12.000 --> 01:15.000
Please don't imagine that you're going to need the ring,

01:15.000 --> 01:17.000
knowing of the magic incantations.

01:17.000 --> 01:21.000
This stuff is hard, but that can show you that you're candid,

01:21.000 --> 01:23.000
and giving something you can remember,

01:23.000 --> 01:25.000
so that you can look at that later,

01:25.000 --> 01:29.000
then I have one and so have you.

01:29.000 --> 01:31.000
And then you can learn why I'm the calls,

01:31.000 --> 01:35.000
it lets me use the same tools everywhere.

01:35.000 --> 01:37.000
The stuff that I'm using in development,

01:37.000 --> 01:39.000
I can then automate into CI.

01:39.000 --> 01:43.000
It'll run on my machine, your machine, and somewhere else.

01:43.000 --> 01:47.000
Most of what I'm using today is very, very mainstream tools,

01:47.000 --> 01:50.000
so they will work across all of the Unix Linux family.

01:50.000 --> 01:54.000
You should be fine on OSX as well.

01:54.000 --> 01:56.000
When those, if you're using WSL, you will be fine.

01:56.000 --> 01:58.000
Everything else, look at these words,

01:58.000 --> 02:02.000
and you'll find the alternative tools that are available.

02:02.000 --> 02:04.000
So they should be pretty transferable.

02:04.000 --> 02:07.000
You'll see my skills.

02:07.000 --> 02:10.000
Don't go out of date nearly as quickly,

02:10.000 --> 02:12.000
as every other tool that's in fashion every year.

02:12.000 --> 02:16.000
So I am just still using the same things that I've been using for years,

02:16.000 --> 02:20.000
and they're very, very familiar to me.

02:20.000 --> 02:26.000
Come on, our text, you can search for them.

02:26.000 --> 02:30.000
You can easily look up what the command does,

02:30.000 --> 02:32.000
which is harder with the button that's like,

02:32.000 --> 02:34.000
it looks like a bit of a picture of a hand,

02:34.000 --> 02:38.000
but the finger, how do you search that?

02:38.000 --> 02:42.000
There are also really, really scriptable.

02:42.000 --> 02:47.000
So you can write a script that does a complicated series of options,

02:47.000 --> 02:52.000
and maybe use the config file and does things in a sequence,

02:52.000 --> 02:56.000
and you can use that and reuse that on this laptop,

02:56.000 --> 02:58.000
the next laptop, someone else's laptop,

02:58.000 --> 03:00.000
and again maybe in your CI setup.

03:00.000 --> 03:06.000
I use it loads for batch operations.

03:06.000 --> 03:11.000
So if you're using program as editor or an IDE,

03:12.000 --> 03:15.000
in the tools are fine on small docs projects.

03:15.000 --> 03:18.000
You know, you've got 100 files or 1000 files,

03:18.000 --> 03:20.000
like it's quite manageable,

03:20.000 --> 03:23.000
but when you're doing those bigger docs projects,

03:23.000 --> 03:25.000
the might span multiple repositories,

03:25.000 --> 03:27.000
they're probably owned by different teams,

03:27.000 --> 03:29.000
some of them came into acquisition,

03:29.000 --> 03:32.000
and you have 10,000 files or 100,000 files,

03:32.000 --> 03:35.000
these are the tools that will let you handle that,

03:35.000 --> 03:38.000
and I hope I've got something that will help you.

03:38.000 --> 03:40.000
On a very personal note,

03:40.000 --> 03:42.000
I also have some accessibility needs.

03:42.000 --> 03:44.000
It cannot use a pointing device of any kind.

03:44.000 --> 03:47.000
I can only use the keyboard.

03:47.000 --> 03:52.000
I genuinely think the CLI is a productivity hack for everyone,

03:52.000 --> 03:55.000
but I'm not an expert because I'm hardcore,

03:55.000 --> 03:57.000
I literally have no choice.

03:57.000 --> 04:01.000
So let's talk about the study of magic lessons

04:01.000 --> 04:04.000
with some of the reusable ingredients

04:04.000 --> 04:07.000
that you are going to see all the way through this talk.

04:07.000 --> 04:11.000
First, the redirect operator,

04:11.000 --> 04:13.000
it's the pointy bracket in the middle.

04:13.000 --> 04:16.000
On the left, I have the list command,

04:16.000 --> 04:18.000
and on the right, I'll file name,

04:18.000 --> 04:21.000
the output of the list command gets redirected

04:21.000 --> 04:23.000
into the file name.

04:23.000 --> 04:25.000
I wrote that we do on the command line,

04:25.000 --> 04:27.000
combines stuff together,

04:27.000 --> 04:29.000
so you're going to see this one a lot.

04:29.000 --> 04:31.000
We got the pipe operator,

04:31.000 --> 04:33.000
take that output,

04:33.000 --> 04:35.000
and instead of putting it into a file name,

04:35.000 --> 04:37.000
give it into the next command,

04:37.000 --> 04:39.000
and I'm going to start showing you things

04:39.000 --> 04:43.000
that you can slot into the different commands.

04:43.000 --> 04:47.000
Why do we need this?

04:47.000 --> 04:54.000
Each CLI tool traditionally,

04:54.000 --> 04:58.000
the established ones, do exactly one thing,

04:58.000 --> 05:01.000
and they do it really well.

05:02.000 --> 05:04.000
And that means that one tool

05:04.000 --> 05:07.000
doesn't wound the functionality of another tool.

05:07.000 --> 05:10.000
We don't make one tool that does all of the things.

05:10.000 --> 05:13.000
We just put together,

05:13.000 --> 05:16.000
build the blocks of the tools that we want to use.

05:16.000 --> 05:19.000
You're also going to hear a lot about regular expressions.

05:19.000 --> 05:22.000
I hope you already know something about regular expressions,

05:22.000 --> 05:24.000
because that is a different talk.

05:24.000 --> 05:29.000
And I am absolutely definitely not giving that talk today.

05:29.000 --> 05:30.000
There is not time.

05:30.000 --> 05:33.000
But you're going to see some of that stuff in the talk,

05:33.000 --> 05:36.000
so as a tiny,

05:36.000 --> 05:39.000
like the smallest possible introduction,

05:39.000 --> 05:42.000
have a look at these three expressions.

05:42.000 --> 05:44.000
The first one,

05:44.000 --> 05:48.000
I'm searching for the letter H,

05:48.000 --> 05:50.000
then any character,

05:50.000 --> 05:51.000
that's the dot,

05:51.000 --> 05:53.000
it's a wild card.

05:53.000 --> 05:55.000
The asked wrist means as many as you want,

05:55.000 --> 05:57.000
and then the letter P.

05:58.000 --> 06:00.000
So this will match hip,

06:00.000 --> 06:01.000
but we can have multiple letters,

06:01.000 --> 06:03.000
so it will also match.

06:03.000 --> 06:05.000
And we are allowing spaces,

06:05.000 --> 06:09.000
so it will match anything that starts with an agent into the P.

06:09.000 --> 06:11.000
The second one,

06:11.000 --> 06:13.000
with the second flex,

06:13.000 --> 06:15.000
or character,

06:15.000 --> 06:18.000
that anchor's it to the start of the line.

06:18.000 --> 06:20.000
You'll also see dollar for an anchor

06:20.000 --> 06:22.000
to the end of the line.

06:22.000 --> 06:24.000
Sometimes you don't want to randomly match in the middle.

06:25.000 --> 06:26.000
You want to be seriously,

06:26.000 --> 06:28.000
it starts like this.

06:28.000 --> 06:30.000
And that will match the or theatre,

06:30.000 --> 06:32.000
or anything else that starts with that.

06:32.000 --> 06:35.000
Finally, I have a find and replace,

06:35.000 --> 06:37.000
and you're going to see this as well.

06:37.000 --> 06:41.000
Replacing every equal signs with that line.

06:41.000 --> 06:44.000
The such G is for global,

06:44.000 --> 06:46.000
do it everywhere.

06:46.000 --> 06:48.000
Some people in the room just already guessed

06:48.000 --> 06:50.000
that I use RS,

06:50.000 --> 06:52.000
it restricts a text a lot.

06:52.000 --> 06:54.000
But this is how you change the heading levels.

06:54.000 --> 06:57.000
So there's a bunch of things here

06:57.000 --> 06:59.000
that you will see.

06:59.000 --> 07:02.000
Again, I can't teach you regular expressions in five minutes,

07:02.000 --> 07:03.000
or less.

07:03.000 --> 07:07.000
It is the apprenticeship takes a lifetime,

07:07.000 --> 07:10.000
but hopefully you'll at least know what you're looking at,

07:10.000 --> 07:13.000
and you'll know what to search for it now.

07:13.000 --> 07:15.000
Right.

07:15.000 --> 07:17.000
The first set of tools I want to show you,

07:17.000 --> 07:20.000
help you to find your way around a project.

07:20.000 --> 07:22.000
You've seen the list command.

07:22.000 --> 07:25.000
You can list with a selection of wildcards.

07:25.000 --> 07:28.000
But I was preparing this talk.

07:28.000 --> 07:31.000
I decided that I would definitely,

07:31.000 --> 07:34.000
you know, I would put together a slide deck,

07:34.000 --> 07:37.000
and you'd be able to refer to it later.

07:37.000 --> 07:40.000
I actually want to show you a slide deck at all.

07:40.000 --> 07:44.000
So let's just jump straight into the command.

07:44.000 --> 07:46.000
Is this big enough?

07:46.000 --> 07:47.000
If you are at the back,

07:47.000 --> 07:49.000
you can read this.

07:49.000 --> 07:51.000
Thank you.

07:51.000 --> 07:52.000
Good.

07:52.000 --> 07:56.000
So this is, I have the Veil source code lying around

07:56.000 --> 07:58.000
on my hard drive.

07:58.000 --> 08:02.000
So we're using the Docs I found in the Veil source code,

08:02.000 --> 08:06.000
because I mostly do Docs projects with places working,

08:06.000 --> 08:08.000
and I am currently between jobs.

08:08.000 --> 08:09.000
I don't want to embarrass anybody.

08:09.000 --> 08:11.000
I now don't work for.

08:11.000 --> 08:13.000
So we'll just use the open source project

08:13.000 --> 08:15.000
that we all know and love.

08:15.000 --> 08:17.000
This is the Veil Docs.

08:17.000 --> 08:19.000
I'm not running the preview locally,

08:19.000 --> 08:20.000
but you can,

08:20.000 --> 08:23.000
and they're on their Docs are in sort of live content.

08:23.000 --> 08:24.000
Good.

08:24.000 --> 08:27.000
These are the files that are in this folder,

08:27.000 --> 08:30.000
and I use LS loads to anchor myself,

08:30.000 --> 08:33.000
and look at the next level down.

08:33.000 --> 08:35.000
I got some files.

08:35.000 --> 08:39.000
I also got some directory,

08:39.000 --> 08:42.000
so the yellow ones without file extension.

08:42.000 --> 08:43.000
Good.

08:43.000 --> 08:44.000
So far, not groundbreaking.

08:44.000 --> 08:47.000
If I just want to see the mark down files,

08:47.000 --> 08:49.000
then we can do that,

08:49.000 --> 08:51.000
and that's what I'm mostly interested in.

08:51.000 --> 08:53.000
We're talking about Docs.

08:53.000 --> 08:55.000
There are a bunch of things I do with LS,

08:55.000 --> 08:58.000
because it has a lot of functionality.

08:58.000 --> 09:00.000
Here it is with the long list format.

09:00.000 --> 09:03.000
The load of our W's, things on the left hand side.

09:03.000 --> 09:05.000
These are the file commissions.

09:05.000 --> 09:08.000
Then we've got the owner and the group.

09:08.000 --> 09:11.000
This can be important if you don't have access to a file,

09:11.000 --> 09:14.000
you should have, or it's got written by something.

09:14.000 --> 09:15.000
It can be useful.

09:15.000 --> 09:18.000
The columns between my name and the date,

09:18.000 --> 09:20.000
is the size.

09:20.000 --> 09:24.000
So I can easily tell from this listing that one of these files is empty.

09:24.000 --> 09:27.000
I find that slightly lower.

09:27.000 --> 09:28.000
We're not fixing the docs,

09:28.000 --> 09:31.000
we're just running commands against using this as the example.

09:31.000 --> 09:33.000
So maybe we can look at this together,

09:33.000 --> 09:36.000
as I'm going to show us contribution later.

09:37.000 --> 09:42.000
Then, and it sorts alphabetically by default.

09:42.000 --> 09:45.000
There's a caveat about case sensitive systems,

09:45.000 --> 09:49.000
but it sort of is alphabetically by default.

09:49.000 --> 09:51.000
So my time has locked itself.

09:51.000 --> 09:52.000
This is going really well.

09:52.000 --> 09:53.000
Good.

09:53.000 --> 09:55.000
I might not want it sorted alphabetically.

09:55.000 --> 09:59.000
How do you feel about doing it sorted by time instead?

09:59.000 --> 10:03.000
So you can see the most recent edit at the top there,

10:04.000 --> 10:07.000
and then all the ones further down.

10:07.000 --> 10:11.000
I've apparently updated this clone quite recently, so.

10:11.000 --> 10:12.000
Yeah.

10:12.000 --> 10:13.000
Good.

10:13.000 --> 10:17.000
Except, this is never what I want when I'm sorting by time,

10:17.000 --> 10:19.000
because if there's a lot of files in the directory,

10:19.000 --> 10:21.000
and you want to look what you just modified,

10:21.000 --> 10:25.000
those need to be here at the bottom where you can see them.

10:25.000 --> 10:31.000
So instead, we will just reverse this and have a quick look what changed.

10:31.000 --> 10:33.000
So this is how you find your way around.

10:33.000 --> 10:36.000
I use this stuff a lot.

10:36.000 --> 10:39.000
So a bit wrong I mentioned, although.

10:39.000 --> 10:43.000
So next, let's have a look at the command called tree.

10:43.000 --> 10:45.000
This is tree.

10:45.000 --> 10:49.000
There's a bit more of it, but essentially, you get the idea.

10:49.000 --> 10:53.000
This shows you directories with the files inside.

10:53.000 --> 10:55.000
It helps me to get a sensor.

10:55.000 --> 10:58.000
You know, there's a list of all these innocuous directories,

10:58.000 --> 11:00.000
but two, you know, they've all got eight files in,

11:00.000 --> 11:02.000
except this one that's got 800 files in.

11:02.000 --> 11:04.000
A lot of useful to know.

11:04.000 --> 11:07.000
So tree lets you see the shape.

11:07.000 --> 11:12.000
As a documentarian, the other time that I use tree.

11:12.000 --> 11:17.000
Is to give a representation of a file structure in documentation,

11:17.000 --> 11:20.000
to show someone how it should be set up.

11:20.000 --> 11:24.000
If you don't have a fancy file representation plugin feature

11:24.000 --> 11:27.000
in your docs platform, you can put this in a code snippet

11:27.000 --> 11:29.000
and everybody will understand it.

11:29.000 --> 11:34.000
So for read these things, it's a really nice tool to use.

11:34.000 --> 11:41.000
Alright, let's look at how to count lines.

11:41.000 --> 11:46.000
Now the file for the command for counting lines is obviously called WC.

11:46.000 --> 11:49.000
Because we allowed developers the name things.

11:49.000 --> 11:52.000
No, it's the word count utility.

11:52.000 --> 11:57.000
But the word count lines and words and bytes,

11:57.000 --> 12:00.000
or sometimes characters, it's usually bytes.

12:00.000 --> 12:05.000
So I'm going to count just the lines on the index file.

12:05.000 --> 12:07.000
Let's go 100 and 22 lines.

12:07.000 --> 12:09.000
Here are a sense of how big that is.

12:09.000 --> 12:11.000
We can run this.

12:11.000 --> 12:16.000
Let's do word count for all the metrics on all the markdown files.

12:16.000 --> 12:22.000
Oh look, now I've got, so that's left hand column is lines.

12:22.000 --> 12:25.000
I've got words and then I've got bytes.

12:25.000 --> 12:27.000
So still got that empty file looking at me.

12:27.000 --> 12:29.000
No, I don't know why that's there.

12:29.000 --> 12:33.000
So if there's one file, but huge, you would know.

12:33.000 --> 12:36.000
And you can also use this in different directories to start

12:36.000 --> 12:38.000
to get a sense of how big this is.

12:38.000 --> 12:42.000
Also if you are writing to a word count,

12:42.000 --> 12:45.000
the word count utility can be quite useful.

12:45.000 --> 12:49.000
And obviously you can batch that up.

12:49.000 --> 12:53.000
What else did I want to tell you about that?

12:53.000 --> 12:58.000
I think this is a good start on the tools that I use

12:58.000 --> 13:01.000
from a structure perspective.

13:01.000 --> 13:04.000
Looking at what do we have?

13:04.000 --> 13:06.000
How is it shaped? How big is it?

13:06.000 --> 13:09.000
Where is it? How is it spread out?

13:09.000 --> 13:14.000
This little set are very mainstream commands that you see all the time.

13:14.000 --> 13:18.000
And I use them all the time. I hope you will use them all the time.

13:18.000 --> 13:22.000
All right, so now we're under some slightly more advanced magic.

13:22.000 --> 13:25.000
And I would like to show you a command called grep.

13:25.000 --> 13:28.000
You might have seen it. Grep now.

13:28.000 --> 13:30.000
It's a verb.

13:30.000 --> 13:33.000
You grep for something.

13:33.000 --> 13:35.000
Technically it isn't.

13:35.000 --> 13:38.000
It's like an acronym and it stands for global regular expressions

13:38.000 --> 13:40.000
such in print. Really?

13:41.000 --> 13:43.000
Tell me ages to learn that instead of something.

13:43.000 --> 13:45.000
It's just a word. Grep. Grep.

13:45.000 --> 13:46.000
It's a verb.

13:46.000 --> 13:48.000
Regics. It's a noun. That's it.

13:48.000 --> 13:50.000
You're dangerous words.

13:50.000 --> 13:54.000
So the grep command is how we search for and find things.

13:54.000 --> 13:57.000
So let's have a look at these amount down files.

13:57.000 --> 14:01.000
So I'm pretty confident there'll be some headings in these amount down files.

14:01.000 --> 14:04.000
And I would like to look at all of the files.

14:04.000 --> 14:09.000
All the lines that start with the hash or pound sign.

14:09.000 --> 14:12.000
I'm pretty sure I'm going to say hash in other Englishes.

14:12.000 --> 14:14.000
You might say pound whatever.

14:14.000 --> 14:16.000
So stop talking. Let's type.

14:16.000 --> 14:21.000
So I'm going to grab recursively for lines that start with.

14:21.000 --> 14:23.000
There's the circumflex.

14:23.000 --> 14:26.000
Here's my pound sign.

14:26.000 --> 14:28.000
And let's just do all the files.

14:28.000 --> 14:30.000
Here's some files.

14:30.000 --> 14:34.000
I expected this to be the headings.

14:34.000 --> 14:36.000
But looking at it.

14:37.000 --> 14:38.000
No, all of those are headings.

14:38.000 --> 14:41.000
I think that we've got here is a selection of.

14:41.000 --> 14:46.000
Comments inside codes and if it's inside marked out files.

14:46.000 --> 14:48.000
So how about to make it easy for demo purposes.

14:48.000 --> 14:50.000
I'm going to change the assignment.

14:50.000 --> 14:52.000
Let's find all of the.

14:52.000 --> 14:54.000
Um, top level subheadings.

14:54.000 --> 14:55.000
So two hashes.

14:55.000 --> 14:57.000
In each file.

14:57.000 --> 14:59.000
Grep again.

14:59.000 --> 15:02.000
So I need start of the line. I need two hashes.

15:02.000 --> 15:03.000
And it is space.

15:03.000 --> 15:04.000
Otherwise we're going to go.

15:04.000 --> 15:07.000
So two hashes and three hashes and four hashes.

15:07.000 --> 15:08.000
We're going to return them all.

15:08.000 --> 15:11.000
So let's see how many second level.

15:11.000 --> 15:13.000
Um, headings the raw.

15:13.000 --> 15:15.000
That looks better.

15:15.000 --> 15:16.000
Yeah.

15:16.000 --> 15:18.000
I'm convinced that that's what I wanted.

15:18.000 --> 15:20.000
And how many were there?

15:20.000 --> 15:21.000
804.

15:21.000 --> 15:22.000
Pretty nice.

15:22.000 --> 15:23.000
Okay.

15:23.000 --> 15:30.000
So we can start to look then with Grep at the characteristics of the files that we work on.

15:30.000 --> 15:33.000
Other things that I enjoy are.

15:33.000 --> 15:35.000
Um, if you have a look at this.

15:35.000 --> 15:37.000
Um,

15:37.000 --> 15:38.000
Mark down.

15:38.000 --> 15:42.000
Then it uses this style of linking.

15:42.000 --> 15:45.000
So instead of pasting URLs all over the.

15:45.000 --> 15:46.000
Uh, serves.

15:46.000 --> 15:50.000
It links to a number and then the number is defined within the file.

15:50.000 --> 15:52.000
You've seen this in other formats.

15:52.000 --> 15:53.000
It's valid in Mark down as well.

15:53.000 --> 15:56.000
Oh, and let's get a list of these.

15:56.000 --> 16:00.000
And I can get that by graping for.

16:00.000 --> 16:02.000
Start the line.

16:02.000 --> 16:04.000
A square bracket.

16:04.000 --> 16:06.000
Some digit.

16:06.000 --> 16:08.000
Another square bracket.

16:08.000 --> 16:10.000
And that probably get them all.

16:10.000 --> 16:12.000
So let's try.

16:12.000 --> 16:14.000
And the way that I do this is our build it up.

16:14.000 --> 16:16.000
So I'll start with like right.

16:16.000 --> 16:18.000
Let's try.

16:18.000 --> 16:20.000
I'm going to grab for a square bucket.

16:20.000 --> 16:21.000
A one.

16:21.000 --> 16:23.000
This is a different.

16:23.000 --> 16:24.000
My normal.

16:24.000 --> 16:25.000
Keyboard.

16:25.000 --> 16:27.000
Try again.

16:27.000 --> 16:28.000
A square bucket.

16:28.000 --> 16:29.000
A square bucket.

16:29.000 --> 16:31.000
It's how special meanings in rejects.

16:31.000 --> 16:34.000
And I literally mean a square bucket.

16:34.000 --> 16:36.000
So let's get it with the one.

16:36.000 --> 16:39.000
And the escape.

16:39.000 --> 16:40.000
And let's.

16:40.000 --> 16:43.000
And then anything.

16:43.000 --> 16:45.000
I want that to start the line.

16:45.000 --> 16:48.000
Otherwise it makes no sense.

16:48.000 --> 16:51.000
And.

16:51.000 --> 16:52.000
Okay.

16:52.000 --> 16:53.000
Wow.

16:53.000 --> 16:55.000
I was going.

16:55.000 --> 16:56.000
Okay.

16:56.000 --> 16:59.000
But I would like the other numbers as well.

16:59.000 --> 17:00.000
And.

17:00.000 --> 17:02.000
So I'm going instead of the one.

17:02.000 --> 17:06.000
I'm going to take that out and allow a range of numbers.

17:06.000 --> 17:11.000
So now you can instantly index all of the links that are in your docs.

17:11.000 --> 17:13.000
Because grep can find them all.

17:13.000 --> 17:14.000
You can put them here.

17:14.000 --> 17:16.000
You can change the outputs.

17:16.000 --> 17:18.000
You can format what grep gives you back.

17:18.000 --> 17:20.000
It can give you just a list of files.

17:20.000 --> 17:23.000
I often use grep to give me a list of files.

17:23.000 --> 17:25.000
And I put the list of files in a file.

17:25.000 --> 17:28.000
And it becomes like the source of truth.

17:28.000 --> 17:32.000
For either scripts that operates on everything.

17:32.000 --> 17:35.000
Or.

17:35.000 --> 17:40.000
Maybe it goes into a spreadsheet as like these are the work items that we need.

17:40.000 --> 17:43.000
These are the files identified that have problems.

17:43.000 --> 17:47.000
So there's lots of things that you can do where this will make it much quicker.

17:47.000 --> 17:54.000
Than even your finding files or something like that in the GUI tools.

17:54.000 --> 17:57.000
One more thing.

17:57.000 --> 17:58.000
One more thing.

17:58.000 --> 17:59.000
I'm going to be very quick.

17:59.000 --> 18:04.000
I've shown you grep and I feel morally obliged to show you said as well.

18:04.000 --> 18:08.000
Said is how we after we find.

18:08.000 --> 18:10.000
We use it to replace.

18:10.000 --> 18:14.000
You're going to use said on the day that your boss comes to me and says,

18:14.000 --> 18:17.000
Okay, we rename the product.

18:17.000 --> 18:19.000
Update the docs now.

18:19.000 --> 18:21.000
We've already brought out the best release.

18:21.000 --> 18:22.000
Go.

18:22.000 --> 18:25.000
Said is that amazing finder replaced.

18:25.000 --> 18:28.000
You're going to use it when you change the syntax.

18:28.000 --> 18:30.000
You use the annotations.

18:30.000 --> 18:35.000
You're going to change it when you use a different plugin for a code snippet.

18:35.000 --> 18:38.000
Those incredible blow your mind.

18:38.000 --> 18:40.000
Big scale changes.

18:40.000 --> 18:42.000
You're going to do that with said.

18:42.000 --> 18:43.000
Probably.

18:43.000 --> 18:47.000
I also want to show you some dip tools because I think that's very important.

18:47.000 --> 18:50.000
We have to go very fast as a while as a large amount of shout at me.

18:51.000 --> 18:56.000
So I'm going to copy this file and we're going to make an original of it.

18:56.000 --> 18:59.000
So that I can dip because I just said I would show you.

18:59.000 --> 19:00.000
This is said.

19:00.000 --> 19:02.000
We're going to do a find and replace.

19:02.000 --> 19:03.000
So I'm going to use the dashi.

19:03.000 --> 19:05.000
We've rebranded bail.

19:05.000 --> 19:06.000
I'm sure they won't mind.

19:06.000 --> 19:08.000
Now it's called fail.

19:08.000 --> 19:10.000
Good.

19:10.000 --> 19:19.000
So let's replace all of the instances of bail with fail.

19:19.000 --> 19:22.000
In this one file so that it's not massive.

19:22.000 --> 19:23.000
All right.

19:23.000 --> 19:25.000
So what happened?

19:25.000 --> 19:27.000
We can dip these two files.

19:27.000 --> 19:29.000
Let's start with the original.

19:29.000 --> 19:32.000
We'll have a little look at the diff.

19:32.000 --> 19:34.000
You can see that there are some changes.

19:34.000 --> 19:37.000
This is not the nicest way to look at changes.

19:37.000 --> 19:40.000
You need this your homework.

19:40.000 --> 19:45.000
Find a dip tool that you love on your platform.

19:45.000 --> 19:46.000
I'm going to use it.

19:46.000 --> 19:48.000
You've been dip a lot.

19:48.000 --> 19:52.000
It shows me the changes in a really nice format.

19:52.000 --> 19:53.000
I can turn on wrap.

19:53.000 --> 19:55.000
It locks the two halves together.

19:55.000 --> 19:56.000
And I'm going to use it.

19:56.000 --> 20:00.000
So I don't need to think my fingers know how to move.

20:00.000 --> 20:03.000
And you can push and pull the changes between versions.

20:03.000 --> 20:07.000
If you have versions that have drifted apart for any reason.

20:07.000 --> 20:10.000
These are the tools that will help you a lot.

20:10.000 --> 20:13.000
There are also very good graphical tools.

20:13.000 --> 20:16.000
I use meld sometimes.

20:16.000 --> 20:20.000
Here, again, you need to look this up for your operating system.

20:20.000 --> 20:24.000
But it's the same sort of thing in a slightly more human-friendly format

20:24.000 --> 20:29.000
with scrolling slightly less terminal type things.

20:29.000 --> 20:30.000
Cool.

20:30.000 --> 20:34.000
So whatever you just did, don't say it, right?

20:34.000 --> 20:35.000
Good.

20:35.000 --> 20:38.000
So we've made a lot of changes.

20:39.000 --> 20:42.000
However, I don't know if you noticed.

20:42.000 --> 20:45.000
But we definitely did stuff we should not have done.

20:45.000 --> 20:47.000
This is not going to work.

20:47.000 --> 20:49.000
I should not have done this here.

20:49.000 --> 20:52.000
I should only have replaced where it was at word.

20:52.000 --> 20:55.000
So I'm not teaching you get today.

20:55.000 --> 20:58.000
But anyway, we're just going to undo those changes.

20:58.000 --> 21:01.000
So I can have another go with my said command.

21:01.000 --> 21:06.000
What I should have done is chosen bail as at word.

21:06.000 --> 21:09.000
So that slash B is the word boundary.

21:09.000 --> 21:12.000
So it will find four stops or new lines or spaces or whatever.

21:12.000 --> 21:14.000
It looks like bail by itself.

21:14.000 --> 21:16.000
Then we'll do the replace.

21:16.000 --> 21:17.000
Good.

21:17.000 --> 21:20.000
We talked a little bit about the dip tool already.

21:20.000 --> 21:23.000
But remember, I'm editing a file that's under source control.

21:23.000 --> 21:25.000
You just watch me reset the changes.

21:25.000 --> 21:27.000
Get Diff.

21:27.000 --> 21:30.000
It's slightly nicer than Diff.

21:30.000 --> 21:34.000
But this is not something that inspires me to gush about the functionality

21:34.000 --> 21:37.000
in a bar, honestly.

21:37.000 --> 21:42.000
And so what you need to do is take that favorite Diff tool

21:42.000 --> 21:44.000
that I told you to choose.

21:44.000 --> 21:49.000
And instead, hook it up to get.

21:49.000 --> 21:54.000
So that when you run it, you get your Diff tool of choice each time.

21:54.000 --> 21:57.000
For a complex Diff, especially something like this,

21:57.000 --> 22:00.000
where we've made a lot of small replacements in one file.

22:00.000 --> 22:02.000
We did it automatically.

22:02.000 --> 22:06.000
You can just come here as an easy way to eyeball stuff

22:06.000 --> 22:08.000
and get it back together.

22:08.000 --> 22:14.000
Managing changes and versions is a key skill.

22:14.000 --> 22:18.000
Take the time to set things up whether you choose CLI tools or something else.

22:18.000 --> 22:21.000
It's really important.

22:21.000 --> 22:23.000
So I made it a slides.

22:23.000 --> 22:25.000
We've seen LS.

22:25.000 --> 22:27.000
You've seen tree for a representation.

22:27.000 --> 22:30.000
You've seen the word count for counting lines.

22:31.000 --> 22:34.000
We have gripped for things.

22:34.000 --> 22:37.000
I have no idea why said is called said.

22:37.000 --> 22:40.000
The reject stuff that we did with said,

22:40.000 --> 22:43.000
you will find in all your editors as well.

22:43.000 --> 22:45.000
So that will be fine.

22:45.000 --> 22:46.000
We've talked about the Diff.

22:46.000 --> 22:52.000
You need to configure, get to use a better Diff tool

22:52.000 --> 22:55.000
than what comes with it for non-trivial changes.

22:55.000 --> 22:57.000
I do not have time to talk to you about Pandok.

22:57.000 --> 22:58.000
It's amazing.

22:59.000 --> 23:02.000
Or the convert tool that comes with it is magic.

23:02.000 --> 23:04.000
We're not going to build scripts today.

23:04.000 --> 23:08.000
I have threatened on social media to write up the whole demo,

23:08.000 --> 23:11.000
the content and everything as a little ebook or publishable thing.

23:11.000 --> 23:14.000
So ping me if you would like to hear about that.

23:14.000 --> 23:16.000
And we will do it.

23:16.000 --> 23:20.000
You've seen a very small tip of an iceberg,

23:20.000 --> 23:26.000
but you can do so much with the tools I have shown you already today.

23:26.000 --> 23:30.000
I hope it gave you some ideas or things you could do with tools you know,

23:30.000 --> 23:34.000
or new tools that you can apply to your projects.

23:34.000 --> 23:37.000
I want to share some resources with you.

23:37.000 --> 23:38.000
That's my blog.

23:38.000 --> 23:40.000
I sometimes write about stuff.

23:40.000 --> 23:42.000
The wizard's in-stuff has amazing,

23:42.000 --> 23:44.000
and you're content people.

23:44.000 --> 23:46.000
We do information.

23:46.000 --> 23:48.000
Has amazing resources go there by all the scenes.

23:48.000 --> 23:49.000
Write it up.

23:49.000 --> 23:52.000
Has some good content as well.

23:52.000 --> 23:55.000
Please remember for all your speakers.

23:55.000 --> 23:57.000
The wizard has a feedback page.

23:57.000 --> 23:59.000
It means a lot to us.

23:59.000 --> 24:00.000
And as a side note,

24:00.000 --> 24:01.000
I don't currently have a job,

24:01.000 --> 24:03.000
so if you need me to do anything for you,

24:03.000 --> 24:04.000
let me know.

24:04.000 --> 24:06.000
Thanks so much everybody.

24:06.000 --> 24:09.000
Thank you.

24:09.000 --> 24:12.000
Thank you.

