Red Hat NETSCAPE MANAGEMENT SYSTEM 6.0 - CUSTOMIZATION Instrukcja Użytkownika Strona 253

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 300
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 252
16.9 Redirecting Standard Input 241
Now letscheckthele by typing:
cat sneakers.txt
And there it is with the contents of home.txt at the end.
What we were saying when we typed that command was, append the output from the le home.txt
to the le sneakers.txt.
By appending the output, weve saved ourselves a step or two (and a bit of disk clutter) by using
existing les, rather than creating a new le.
Compare the results of the les sneakers.txt and saturday now, and youll see that theyre
identical. To make your comparison, just type:
cat sneakers.txt; cat saturday
The contents of both les will be displayed - rst sneakers.txt,thensaturday (as shown in
Figure 16.14).
Tip: Remember that when you append output, youve got to include the double greater-
than symbols (>>). Otherwise, youll end up replacing the very le to which you want
to append information!
(By the way, if youre curious about the use of the semi-colon in that last command, read on. Well
cover that later in this chapter.)
Summary: To append output, use two greater-than symbols (>>). For example: cat
addthisfile >> tothisfile.
16.9 Redirecting Standard Input
Not only can you redirect standard output, you can perform the same type of redirection with stan-
dard input.
Hereshowitworks:
When you use the redirect standard input symbol <,youre telling the shell that you want a le to be
read as input for a command.
We can use a le weve already created to demonstrate this idea. Just type:
Przeglądanie stron 252
1 2 ... 248 249 250 251 252 253 254 255 256 257 258 ... 299 300

Komentarze do niniejszej Instrukcji

Brak uwag