O'Reilly logo

SAMS Teach Yourself Unix in 10 Minutes by Robert Shimonski

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Building Unix Shell Script Files

In our shell script example, we saw that lines of text (such as commands with REs) could be entered into the shell prompt (command interpreter) and executed. This is not necessarily a script file because it is not in a file. It's just being added to the prompt and executed immediately.

The other way to do this would be to use those lines (so you don't have to type them) to identically add them to a file that you can run to execute its contents. In other words, when you boot up your system and login, you can have your email opened, and run a cron job, maybe open the vi editor—you add all these to the file, save it, and then run that file. By typing the name of the file at the shell prompt, it will execute the file's ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required