beanz Magazine

Command Line Interface (CLI) Part II

Juan Lupion on Flickr

Take your CLI skills to the next level as you combine, redirect, and script commands.

Last time we spent some time getting comfortable with the command line and using a terminal. Here, we’ll be continuing where we left off with learning how to use the command line interface to control your computer.

We’ll be discussing a few common built-in programs that come with the terminal, how to combine commands together, how to redirect the output of a command into a file, and just exactly how the terminal even finds commands and programs in the first place. Finally, we’ll have our first little taste of writing our own terminal commands by doing some bash scripting.

To follow along, first open up a terminal on your computer. Now try typing nano and hitting enter. You’re actually now in a tiny text editor and it should look something like the following:

Go ahead and type a little bit of text and hit Ctrl-X to exit and save. You’ll be prompted to give it a filename. You can actually call it anything, but I’ll call it test.txt. Nano is a convenient little program for doing quick edits on the command line, especially if you’re remotely controlling another computer over SSH, but that’s a topic we’ll cover in a future article.

Become a subscriber and get access to the rest of this article. Plus all our magazine articles.

Stories also include numerous links to help parents, kids, and teachers learn more. Get access today at just $15 per year for online magazine only or $29.99/year for print + online ($35/year outside US)!

Subscribe Today!

Also In The August 2018 Issue

Use SketchUp to recreate the famous optical illusion that grows and shrinks people around the room.

Learn what makes a good rogue-like game and how to make one yourself.

Unleash your inner digital chef through this simple (but mouth-watering) Python activity.

Dinosaur fossils, STEM podcasts, and a day in the life of a paleontologist.

A fun introduction to programming games with fantasy computers. The 70s and 80s are back in style!

Real life treasure hunts are a way to get outdoors, learn map skills, and have fun finding hidden caches near you.

Tips & trips to help you have a great time on the Internet, even when others don’t behave well.

How scientists finally cracked the code behind the mysterious language of Ancient Egypt.

Two small projects introducing you to Edublocks, a language that bridges the gap between Scratch and Python.

Take your CLI skills to the next level as you combine, redirect, and script commands.

It looks like JavaScript, has a Python aesthetic, and integrates easily with C/C++. Meet Lua: a scripting language for fantasy computers.

How the high-tech LIGO made a huge discovery and won its three founders a Nobel Prize.

An introduction to the devices that’ll make your robots zoom, skitter, and spin.

Learn the secrets behind pixels, image blurs, and all your favourite Instagram filters!

Links from the bottom of all the August 2018 articles, collected in one place for you to print, share, or bookmark.

Interesting stories about computer science, software programming, and technology for August 2018.