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

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 300
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 248
16.7 Using Redirection 237
Figure 16.11: cat demonstrates standard input and standard output
16.7 Using Redirection
Now that we have a handle on what standard input and standard output are, itstimetoexpanda
little.
Redirection means causing the shell to change what it considers standard input or where the standard
output is going.
We used cat before to demonstrate the idea behind standard input and standard output. Now, lets
use cat to see how standard output can be redirected.
To redirect standard output, well use the > symbol. Placing > after the cat command (or after any
utility or application that writes to standard output) will direct its output to the lename following
the symbol.
Letstryit.Inanxtermwindowtype:
[billy@localhost billy]$ cat > sneakers.txt
buy some sneakers
then go to the coffee shop
then buy some coffee
Now press
Enter to go to an empty line, and use the Ctrl and D keys to quit cat.
Przeglądanie stron 248
1 2 ... 244 245 246 247 248 249 250 251 252 253 254 ... 299 300

Komentarze do niniejszej Instrukcji

Brak uwag