We've seen how to pass arguments to programs, and we've seen how to write to files. Now we'll look at how that is done from the Terminal.
A pipe redirects the standard output (stdout) from one program to the standard input (stdin) of another. It acts like a tunnel (or pipe) between two programs, which
There are a few programs in Linux which every programmer MUST use at one point or another. Most of these are every-day tools, without which we cannot survive.
There are three basic functions we use to move files around in the Linux terminal. They are, in no particular order:
cp source_location destination_location - Copy a
Compiling your program is easy when you're working with one source and the standard libraries, but it gets more complex as you go along. That's why God put make on this earth.
The First Makefile
...was created alongside the Earth. Every other makefile is derived from a previous one.
Jokes aside, the make program reads a makefile
It's almost time to talk about that most important aspect of programming - testing. However, before we start talking about the tools, we need to look at some basic concepts of debugging.
A bug is anything that doesn't work exactly as expected. Bugs can be fatal - they can crash your machine - or bugs
Most IDEs come with a built-in debugger. However, for most skilled C programmers, there is only one debugger: gdb.
Alright, enough theory. Time to actually debug something!
We've used the terminal a number of times. It turns out that we can write simple scripts to automate some of our routines.
Here's a quick example of scripting in sh.
Let's revisit filters with a timeless classic - grep.
Many valuable programs in Linux rely on the concept of the Regular Expression (REGEX). It's important for us to understand the basics of this language so that we can better use the tools we're provided.