Latest / CyberCode Academy / Course 4 - Learning Linux Shell Scripting | Episode 1: Essential: Utilities, Variables, I/O, and Program Flow
Transcript
- 0:00Speaker 1: Welcome to the deep dive. If you're anywhere near programming,
- 0:03Speaker 1: sysadmin work, maybe cybersecurity, you know the command line is well,
- 0:07Speaker 1: it's more than just typing. It's like the real language
- 0:09Speaker 1: of the machine. Today we're diving into the Shell scripting toolkit.
- 0:16Speaker 1: We want to turn that terminal, which can feel pretty
- 0:19Speaker 1: cryptic sometimes, into this really powerful engine for automation.
- 0:23Speaker 2: That really is the mission, isn't it. We're not just
- 0:25Speaker 2: talking about basic commands today. The goal is to get
- 0:28Speaker 2: fluent with the core building blocks of how the shell works,
- 0:34Speaker 2: how data gets created, stored, processed, and maybe most importantly,
- 0:38Speaker 2: how it gets directed. If you can get a handle
- 0:40Speaker 2: on that data flow, you can build some seriously robust,
- 0:43Speaker 2: efficient scripts.
- 0:45Speaker 1: All right, let's unpack that. That sounds like a lot
- 0:47Speaker 1: but foundational. Where do we start? I guess the very
- 0:49Speaker 1: first thing you do making the terminal talkback right, printing
- 0:53Speaker 1: stuff exactly.
- 0:54Speaker 2: And you've basically got two main ways to do that,
- 0:56Speaker 2: Echo and print.
- 0:56Speaker 1: Okay, echo and print. When do you pick which one?
- 0:59Speaker 1: What's the strategy?
- 1:01Speaker 2: Well, Echo is your go to for quick interactive stuff.
- 1:04Speaker 2: It's simple, spits out text and conveniently adds a new
- 1:08Speaker 2: line at the end automatically candy. Yeah, but if you're
- 1:12Speaker 2: writing a script something that needs to be reliable, maybe
- 1:15Speaker 2: run in production, it will probably want print.
- 1:18Speaker 1: Okay, why print for the serious stuff? What makes it
- 1:21Speaker 1: more robust?
- 1:22Speaker 2: It uses C style formatting that means you get like
- 1:25Speaker 2: total control over the output. Unlike Echo, it doesn't add
- 1:28Speaker 2: that new line unless you specifically tell it to withn oh. Okay,
- 1:33Speaker 2: but the payoff is precision. You can line things up
- 1:35Speaker 2: in columns, set string with even handle floating point numbers,
- 1:39Speaker 2: and round them exactly how you want, like say two
- 1:42Speaker 2: decimal places using pretend to have to Echo just can't
- 1:45Speaker 2: do that reliably.
- 1:45Speaker 1: Gotcha, and I remember reading that with echo. You have
- 1:48Speaker 1: to be super careful with quotes. Why is that such
- 1:50Speaker 1: a potential pitfall quoting versus not quoting?
- 1:52Speaker 2: Oh? Definitely, because the shell is always trying to interpret
- 1:55Speaker 2: what you type. If you just type echo and then
- 1:57Speaker 2: some text with say a semi colon or maybe an
- 2:00Speaker 2: exclamation mark, the shell might think you're trying to run
- 2:03Speaker 2: two separate commands because of the semicolon, or it might
- 2:06Speaker 2: try to do history expansion with the exclamation mark. Quotes. Basically,
- 2:10Speaker 2: tell the shell, hey, treat this literally as text. Don't
- 2:13Speaker 2: try to be clever.
- 2:14Speaker 1: Okay, So quotes are like a safety barrier for your text.
- 2:17Speaker 1: Makes sense now beyond just plain texts, sometimes you want
- 2:20Speaker 1: visual cues, right colors, How do you make output colorful
- 2:24Speaker 1: for like log monitoring or status stuff.
- 2:26Speaker 2: Yeah, you can use escape sequences. The key is using
- 2:29Speaker 2: echo the details echo to interpret those escape sequences. The
- 2:33Speaker 2: standard foreground colors are codes thirty through thirty seven. Backgrounds
- 2:37Speaker 2: are forty to forty seven. So you'd use echoe with
- 2:40Speaker 2: something like e thirty one meters for red text.
- 2:42Speaker 1: But there's a catch, isn't there.
- 2:44Speaker 2: The critical thing, and people forget this all the time,
- 2:47Speaker 2: is you must reset the color afterwards. You use the
- 2:50Speaker 2: reset code, which is zero like zero meter. If you
- 2:54Speaker 2: don't reset, that color just bleeds. It affects everything else
- 2:57Speaker 2: you type in the terminal afterwards. Looks messy, professional, You
- 3:00Speaker 2: got to clean up after yourself with the reset code.
- 3:02Speaker 1: Good tip, keep that terminal tidy. Okay, so we can
- 3:05Speaker 1: print text ad color. Now let's get dynamic variables storing data.
- 3:10Speaker 2: The big rule in bashes, everything's a string. That's the
- 3:13Speaker 2: absolute foundation. Even if you assign a number like my
- 3:16Speaker 2: var ten bash treats it as the characters one and zero,
- 3:20Speaker 2: not the number ten until you specifically tell it to.
- 3:22Speaker 1: Do math right, and we define our own variables, but
- 3:25Speaker 1: the shell also gives us some built in ones environment.
- 3:28Speaker 2: Variables exactly, things like path that tells the show where
- 3:31Speaker 2: to find commands, or home your user directory, you ad
- 3:35Speaker 2: your user I D shell, your default shell. These are
- 3:38Speaker 2: special because they get passed down inherited by any programs
- 3:42Speaker 2: or scripts.
- 3:43Speaker 1: You run, and the syntax man the syntax for assigning them.
- 3:46Speaker 1: This trips everyone up at first.
- 3:48Speaker 2: Yeah, yeah, no space is around the equals sign. It
- 3:50Speaker 2: has to be var value. If you put spaces like
- 3:53Speaker 2: var value, the shell thinks far as the command you're
- 3:55Speaker 2: trying to run with y and value as arguments, it
- 3:57Speaker 2: completely changes the meaning. Usually just errors out.
- 4:00Speaker 1: Or does an equality check maybe.
- 4:02Speaker 2: Sometimes yeah, depending on context. But for assignment, yeah, no spaces,
- 4:07Speaker 2: then get the value back. You just put a dollar
- 4:09Speaker 2: sign in front v hour okay.
- 4:11Speaker 1: And these environment variables pop up in scripting for checks
- 4:14Speaker 1: like seeing if a script is running as the super user.
- 4:18Speaker 2: Perfect example, you just check the UID environment variable UID.
- 4:21Speaker 2: If sqal to zero, you know the script is running
- 4:24Speaker 2: is root. Lets you put guards around dangerous operations right at.
- 4:27Speaker 1: The start smart okay, so variable store data, next step
- 4:30Speaker 1: moving that data around. This feels like where the real
- 4:34Speaker 1: power comes and data flow. Redirection, dot file descriptors YEP.
- 4:37Speaker 2: File descriptors are fundamental. Think of them as like the
- 4:41Speaker 2: standard pipes or channels the shell uses. Channel zero is
- 4:44Speaker 2: for input stealth and d channel one is for normal
- 4:47Speaker 2: outputs to doubt okay, and channel two is specifically for
- 4:50Speaker 2: AerR messages. Strators zero, one and two.
- 4:52Speaker 1: Those are the standard one and redirection using the greater
- 4:54Speaker 1: than sign sir. Lets us point those channels somewhere else,
- 4:57Speaker 1: like a file.
- 4:58Speaker 2: Exactly we'll create a file or why the clean and
- 5:00Speaker 2: right the output there will append to the file if
- 5:02Speaker 2: it exists.
- 5:03Speaker 1: But you mentioned channel one and channel two. Why is
- 5:05Speaker 1: it so important to distinguish where the output goes redirecting
- 5:10Speaker 1: one versus two.
- 5:11Speaker 2: Because you almost always want to keep your normal successful
- 5:15Speaker 2: output separate from error messages. If you just use error
- 5:19Speaker 2: or by itself, that only redirects standard output Channel one okay,
- 5:24Speaker 2: so capture only the errors. You have to explicitly tell it.
- 5:26Speaker 2: Channel two so you'd use two error dot log super
- 5:30Speaker 2: important for clean logging. Especially in automated scripts. You don't
- 5:33Speaker 2: want errors mixed up with your actual results.
- 5:36Speaker 1: Makes sense. What if a command is just noisy, spitting
- 5:38Speaker 1: out areas you don't care about, is there a way
- 5:40Speaker 1: to just silence it?
- 5:41Speaker 2: Yeah, the shell's ultimate mute button Dibnell black hole. Pretty much,
- 5:46Speaker 2: it's a special file. Anything you redirect there just vanishes,
- 5:49Speaker 2: poof gone forever. So if you want to ignore errors
- 5:52Speaker 2: from a command but still see its normal output, you
- 5:55Speaker 2: do something like command two divnal useful.
- 5:57Speaker 1: Okay. Now, for connecting commands, the symbol love. This feels
- 6:01Speaker 1: very the Unix.
- 6:02Speaker 2: Sy it's the heart of the Unix philosophy. Really. The
- 6:04Speaker 2: pipe takes the standard output channel one the good stuff
- 6:07Speaker 2: from the command on its left, and feeds it directly
- 6:10Speaker 2: into the standard input channel zero of the command on
- 6:13Speaker 2: its right. It lets you chain commands together, like get
- 6:17Speaker 2: some data, then filter it, then sort it, then count
- 6:20Speaker 2: it all one line without needing temporary files. It's incredibly efficient.
- 6:24Speaker 1: Okay, that's powerful. But what if I need to say,
- 6:27Speaker 1: log the raw output before I filter it. Can I
- 6:29Speaker 1: save it and still pass it on.
- 6:31Speaker 2: Yes, that's exactly what the tea command is for. Think
- 6:33Speaker 2: of it like a T splitter and plumbing. Okay, the
- 6:36Speaker 2: data stream hits T, a copy gets diverted off to
- 6:39Speaker 2: the side into a file you specify, but the original
- 6:42Speaker 2: stream continues straight on down the pipe to the next command,
- 6:45Speaker 2: so you can log in process simultaneously.
- 6:47Speaker 1: New like a T junction. Got it all right, We've
- 6:50Speaker 1: run our commands, pipe them, redirected them. How do we
- 6:53Speaker 1: know if it all actually worked? Was it successful?
- 6:55Speaker 2: Check the special variable dollar. Immediately after any command finishes,
- 6:59Speaker 2: the shell puts it's exit status into dollar.
- 7:01Speaker 1: Eggs.
- 7:02Speaker 2: Yeah. By convention, and exit status of zero means success.
- 7:06Speaker 2: Everything went okay. Any non zero value, usually one or
- 7:09Speaker 2: two or something else, signals some kind of failure or error.
- 7:13Speaker 2: So just check dollars right after. Zero is good. Non
- 7:16Speaker 2: zero is bad.
- 7:17Speaker 1: Simple enough, Zero good, non zero bad. Okay, let's shift gears.
- 7:21Speaker 1: We've got data flowing. Now, let's build some smarts math
- 7:24Speaker 1: logic loops. We said bash Variables are strings that sounds
- 7:29Speaker 1: like a problem for math.
- 7:30Speaker 2: It is for basic math anyway, things like let it
- 7:32Speaker 2: or double parentheses. They work, but they are strictly integer only,
- 7:37Speaker 2: meaning meaning if you try to do, say, ten divide
- 7:39Speaker 2: a bay three, they'll just give you three. They completely
- 7:41Speaker 2: chop off any decimal part, no rounding, just truncation.
- 7:45Speaker 1: Ouch. Not great for anything precise. So if you need
- 7:48Speaker 1: real math decimals, what do you do?
- 7:50Speaker 2: You call in the specialist dot BC. It stands for
- 7:53Speaker 2: a basic calculator, but it's actually pretty powerful. It's the
- 7:55Speaker 2: standard Unix precision calculator ah BC. Yeah, you typically pipe
- 7:59Speaker 2: your calculation to be like echo ten three BC, but
- 8:02Speaker 2: the real power comes with a scale variable. If you
- 8:04Speaker 2: need say five decimal places, you do echoscale five ten
- 8:07Speaker 2: three BC.
- 8:08Speaker 1: Oh nice, So you set the precision before the calculation exactly.
- 8:11Speaker 2: Scale controls the rounding. It turns BASH, which is terrible
- 8:15Speaker 2: at decimals, into something that can handle financial or scientific
- 8:18Speaker 2: math reliably. BC can even do base conversions like decimal
- 8:22Speaker 2: to binary.
- 8:23Speaker 1: Very cool. Okay, math handled. What about logic making decisions
- 8:28Speaker 1: with I false that relies on tests comparisons? What's the
- 8:32Speaker 1: modern way to write those tests?
- 8:35Speaker 2: Best practice now is definitely double square.
- 8:37Speaker 1: Brackets, not single brackets.
- 8:39Speaker 2: You can use single brackets, they're the older way, but
- 8:41Speaker 2: double brackets are just safer. They handle things like empty
- 8:44Speaker 2: variables or variables with spaces much more gracefully, less likely
- 8:48Speaker 2: to give you weird unexpected errors due to word splitting
- 8:50Speaker 2: or file name expansion.
- 8:52Speaker 1: Use ammon okay for safer tests. And when you're testing
- 8:54Speaker 1: things in the file system, which checks are absolutely essential, you'll.
- 8:57Speaker 2: Use these all the TIMEHF to check something exists and
- 9:00Speaker 2: is a regular file, dash D to check if it's
- 9:03Speaker 2: a directory, and mash x to check if you have
- 9:05Speaker 2: execute permission on a file.
- 9:07Speaker 1: Dash fd x, dush X file directory executable.
- 9:11Speaker 2: Yep. Those three cover a huge amount of ground for
- 9:13Speaker 2: making sure your script doesn't try to read a directory
- 9:17Speaker 2: as if it's a file, or run something that isn't executable.
- 9:20Speaker 1: Basic sanity checks, got it now for repetition, dot loops
- 9:25Speaker 1: for loops, wile loops. But processing structured data like lines
- 9:29Speaker 1: from a file where fields are separated by commas or
- 9:32Speaker 1: something that seems tricky.
- 9:34Speaker 2: That's where the internal field separator or IFS comes in.
- 9:37Speaker 2: This is a really important concept.
- 9:39Speaker 1: I FS.
- 9:40Speaker 2: Yeah, it's an environment variable, believe it or not. It
- 9:42Speaker 2: tells the shell what character to use to split things
- 9:45Speaker 2: into words or fields. By default, it's usually white space
- 9:49Speaker 2: based tab newline.
- 9:50Speaker 1: Okay, So how does that help with say a CSV file?
- 9:54Speaker 2: Well, if you want to loop through the fields in
- 9:56Speaker 2: a comma separated line, you temporarily change ifs to just
- 9:59Speaker 2: a comma. Then when the shell splits, the line uses
- 10:02Speaker 2: the comma as the delimiter, giving you each field separately.
- 10:05Speaker 1: Ah. So you tell the shell how the data is
- 10:07Speaker 1: structured by setting ifs exactly.
- 10:10Speaker 2: You'd set ifs to a colon if you're parsing et cetera.
- 10:12Speaker 2: It's password, for example, then you set it back to
- 10:15Speaker 2: the default when you're done. It's basically the key to
- 10:18Speaker 2: parsing structured text directly in Bash.
- 10:21Speaker 1: That's clever. So set ifs do your loop? What kinds
- 10:24Speaker 1: of loops do we have?
- 10:25Speaker 2: You've got your standard for loop. Bash even has nice
- 10:27Speaker 2: sequence generation for i in one point one zero or
- 10:30Speaker 2: even easy oh neat. Then there's the classic wile loop,
- 10:33Speaker 2: which runs as long as a condition is true, and
- 10:36Speaker 2: the slightly less common until loop, which is the opposite.
- 10:38Speaker 2: It runs until its condition becomes true.
- 10:40Speaker 1: Okay, good toolkit for iteration. Let's move into some more
- 10:43Speaker 1: advanced things.
- 10:43Speaker 2: Reusability functions absolutely functions in Bash work much like in
- 10:48Speaker 2: other languages. You can find a block of code, give
- 10:50Speaker 2: it a name, and then you can call it arguments
- 10:52Speaker 2: get passed in as positional parameters one dollar for the
- 10:56Speaker 2: first argument, two dollars for the second, and so on.
- 10:58Speaker 1: And there was one example function and mentioned pre pend.
- 11:01Speaker 1: Why is that considered a good power user example?
- 11:05Speaker 2: Prepend is great because it solves a common, slightly tricky
- 11:08Speaker 2: problem really robustly. It's designed to add a new directory
- 11:12Speaker 2: to the beginning of a coalon separated environment variable like
- 11:15Speaker 2: your path.
- 11:16Speaker 1: Okay, why is that tricky?
- 11:18Speaker 2: The tricky part is handling the case where the original
- 11:21Speaker 2: variable like path might be empty to begin with. If
- 11:24Speaker 2: you just blindly add newear to an empty path, you
- 11:29Speaker 2: end up with a path that starts with a colon,
- 11:31Speaker 2: which can cause weird issues. Prepen checks if the original
- 11:34Speaker 2: variable is empty and handles it correctly, avoiding that leading colon.
- 11:37Speaker 2: It's defensive scripting.
- 11:39Speaker 1: Nice smart. Speaking of functions, there's a dark side, right
- 11:42Speaker 1: the fork bomb.
- 11:43Speaker 2: Oough, Yes, the fork bomb. It's nasty. It's basically a
- 11:47Speaker 2: tiny recursive function that defines itself and then immediately calls
- 11:51Speaker 2: itself twice in the background, piping its output to another
- 11:53Speaker 2: call of itself.
- 11:54Speaker 1: Sounds exponential, it is.
- 11:56Speaker 2: It just spawns process like crazy, very very quickly. Until
- 11:59Speaker 2: the system completes, runs out of resources CPU memory, and
- 12:02Speaker 2: grinds to a halt. That's a classic denial of service
- 12:05Speaker 2: attack that fits on one line of code.
- 12:06Speaker 1: Yikes, how does systems protect against that?
- 12:09Speaker 2: Thankfully, most modern Linux systems have resource limits set up,
- 12:13Speaker 2: usually in file like atsetter security limits dot com fists.
- 12:16Speaker 2: These limits restrict how many processes a single user can run,
- 12:20Speaker 2: preventing one runaway script or fork bomb from taking down
- 12:22Speaker 2: the hole machine.
- 12:23Speaker 1: Phew, okay, good safety net. Now something less destructive. Aliases
- 12:29Speaker 1: shortcuts right yeah.
- 12:30Speaker 2: Aliases are basically nicknames for longer commands, super handy for
- 12:34Speaker 2: personal use, like you get alias installed to mean pseudo
- 12:38Speaker 2: app to get installed dansh y or something saves typing totally.
- 12:42Speaker 2: You can set them up temporarily just for your current session,
- 12:44Speaker 2: or make them permanent by adding them to your shells
- 12:46Speaker 2: startup file usually bash r SHEI.
- 12:49Speaker 1: But there's a security angle here too.
- 12:50Speaker 2: There is imagine an attacker gets access to your account
- 12:54Speaker 2: and creates an alias. What if they alias to l's
- 12:56Speaker 2: to be rmir rf or alias pseudo to something that
- 13:01Speaker 2: steals your password?
- 13:02Speaker 1: Oh wow, okay, that's bad. So if you suspect an
- 13:04Speaker 1: alis is messing with you, or you just want to
- 13:06Speaker 1: be sure you're running the real command. Especially with Pseudo,
- 13:08Speaker 1: How do you bypass the alias?
- 13:10Speaker 2: Simple trick, put a backslash right before the command name,
- 13:13Speaker 2: so instead of typing arm, you type arm just a
- 13:16Speaker 2: backslash YEP that tells the shell ignore any alias for
- 13:20Speaker 2: this command, run the actual program file. It's a small thing,
- 13:24Speaker 2: but really important for security hygiene. Always use pseudo if.
- 13:27Speaker 1: You're unsure Pseudo, good habit, Okay. Last big area debugging
- 13:32Speaker 1: and controlling the terminal itself. What happens when your beautiful
- 13:36Speaker 1: script breaks? How do you figure out why?
- 13:40Speaker 2: The first go to is bash is built in debug
- 13:43Speaker 2: tracing flag nash x. You run your script like this
- 13:46Speaker 2: bash nash xyrscript dot sh. The shell will then print
- 13:51Speaker 2: every single command from your script to the aerostream right
- 13:53Speaker 2: before it executes. It usually prefix with a plus sign
- 13:56Speaker 2: showing you exactly what's running and how variables are expanding
- 14:00Speaker 2: or bose but invaluable.
- 14:01Speaker 1: Can you turn that on just for part of a
- 14:03Speaker 1: script if it's really long?
- 14:04Speaker 2: Yes. Inside the script itself you can put set an
- 14:06Speaker 2: ass x in a line to turn tracing on from
- 14:08Speaker 2: that point forward and then later you can use set
- 14:10Speaker 2: plus x plus x to turn it off again. Let's
- 14:12Speaker 2: use zero in on just the troublesome section.
- 14:14Speaker 1: Perfect okay, and controlling the terminal's appearance or behavior t
- 14:17Speaker 1: put in stidy right.
- 14:19Speaker 2: Teput is mostly about screen manipulation. You can use it
- 14:22Speaker 2: to query things like the number of columns to put
- 14:24Speaker 2: coals or rows of put lines, or do fancier things
- 14:27Speaker 2: like save the current cursor position deput c and restore
- 14:31Speaker 2: it later to put rc and staatey's more about the
- 14:34Speaker 2: terminal settings. A classic use is for running passwords securely.
- 14:38Speaker 2: You can use di echo to turn off character echoing,
- 14:41Speaker 2: read the password, and then immediately use did echo to
- 14:43Speaker 2: turn it back on so the password doesn't appear on
- 14:46Speaker 2: screen as the user types it.
- 14:47Speaker 1: AH. Very useful, and you can combine these like teput
- 14:50Speaker 1: and maybe the sleep command.
- 14:52Speaker 2: Oh yeah, that's a knee trick. Sleep just pauses the
- 14:54Speaker 2: script for a specified number of seconds, like sleep three.
- 14:58Speaker 2: You can use t put c to save the cursor
- 14:59Speaker 2: pace position print something like a counter. You sleep one
- 15:03Speaker 2: to wait a second, then use tput rc to move
- 15:05Speaker 2: the cursor back to where it was before printing the
- 15:08Speaker 2: next value.
- 15:08Speaker 1: So you can make a counter that updates in the
- 15:10Speaker 1: same spot on the screen instead of scrolling.
- 15:12Speaker 2: Exactly, a live in place counter very slick for status displays.
- 15:16Speaker 2: And don't forget personalization. Your command prompt itself that's controlled
- 15:21Speaker 2: by the PS one environment variable. Yep, you can customize
- 15:24Speaker 2: it with special codes like you for your username, H
- 15:27Speaker 2: for the host name, W for the current working directory.
- 15:30Speaker 2: Make your prompt look exactly how you want it. So
- 15:33Speaker 2: you see, we've really covered a lot of ground today,
- 15:36Speaker 2: from just printing text all the way to managing how
- 15:39Speaker 2: data flows using pipes and redirection, handling errors, doing math,
- 15:43Speaker 2: making logical decisions, using functions for reuse, and even debugging
- 15:47Speaker 2: and controlling the terminal display. Mastering these isn't just about
- 15:50Speaker 2: typing commands faster. It's about understanding the language the shell speaks,
- 15:54Speaker 2: so you can build tools, automate complex tasks, and manage
- 15:57Speaker 2: systems much more effectively. These are the building blocks for
- 16:00Speaker 2: real automation.
- 16:01Speaker 1: Absolutely, So what does this all really mean for you? Listening?
- 16:07Speaker 2: Hopefully you've gone from maybe just seeing the command line
- 16:10Speaker 2: as a place to type things to understanding the logic,
- 16:13Speaker 2: the flow, the efficiency you can build into it. This
- 16:16Speaker 2: is the toolkit you need for serious systems work, for
- 16:18Speaker 2: handling data reliably, for building robust solutions. Okay, let's put
- 16:23Speaker 2: some of this together. Here's a little challenge for you
- 16:24Speaker 2: to think about. Imagine you have a log file and
- 16:27Speaker 2: the fields in each line are separated by commas. You
- 16:31Speaker 2: need to write a script that checks this file repeatedly
- 16:33Speaker 2: looking for a line containing a specific success message, maybe
- 16:37Speaker 2: task complete. How would you combine what we talked about today,
- 16:40Speaker 2: specifically the internal field separator ifs checking the exit status
- 16:44Speaker 2: of a command and using the sleep command to create
- 16:47Speaker 2: a loop that does the following. Okay, one, It processes
- 16:50Speaker 2: lines using the comma as the separator, so you need
- 16:51Speaker 2: ifs two Inside the loop, it searches for your task
- 16:54Speaker 2: complete message three. The loop continues until that message is found.
- 16:58Speaker 2: Think about I'm a search from your search command helps
- 17:00Speaker 2: here and for between each check of the file, it
- 17:03Speaker 2: pauses for three seconds using sleep. Nice little puzzle uses
- 17:07Speaker 2: ifs dollars in sleep. Good one.
- 17:10Speaker 1: Give that some thought and definitely take a moment sometime
- 17:13Speaker 1: to play with your PS one variable. Customize that prompt
- 17:16Speaker 1: make your terminal feel like home.
- 17:18Speaker 2: Good advice.
- 17:19Speaker 1: Thanks for diving deep with us, today,