Using Multiple Commands - Red Hat ENTERPRISE LINUX 4 - STEP BY STEP GUIDE Manual

Table of Contents

Advertisement

64
Chapter 4. Shell Prompt Basics
Figure 4-9. diff Comparison of example1.txt and foo.txt
4.9.4. Redirecting Standard Input
You can also perform the same type of redirection with standard input.
When you use the redirect standard input symbol <, you are telling the shell that you want a file to be
read as input for a command.
The following screen shows
being redirected as input for
:
foo.txt
cat
Figure 4-10. Redirecting Standard Input

4.10. Using Multiple Commands

Linux allows you to enter multiple commands at one time. The only requirement is that you separate
the commands with a semicolon.
Suppose you have downloaded a new file called
and you want to put it in
foobar-1.3-2.i386.rpm
a new subdirectory within your home directory called
, but the subdirectory has not been cre-
rpms/
ated. You can combine both the creation of the
directory and the moving of your downloaded
rpms/
file into the directory by typing the following at a shell prompt:
mkdir rpms/; mv foobar-1.3-2.i386.rpm rpms/
Running the combination of commands creates the directory and moves the file in one line.

Advertisement

Table of Contents
loading

This manual is also suitable for:

Enterprise linux 4

Table of Contents