[cs631apue] Question about operator and redirect

Yanqiao Zhan yzhan14 at stevens.edu
Fri Dec 11 15:41:10 EST 2015


Hi Professor,
I have two questions:
1. Will there always have whitespace before and after operator(e.g & > >> |
<)?
2. In linuxlab, I did a experiment of redirection.

yzhan14 at avatar:~$ echo "hello" > test1 > test2 > test3 > test4 > test5
yzhan14 at avatar:~$ cat test*
hello
yzhan14 at avatar:~$ ll test*
-rw-r--r--+ 1 yzhan14 student 0 Dec 11 15:35 test1
-rw-r--r--+ 1 yzhan14 student 0 Dec 11 15:35 test2
-rw-r--r--+ 1 yzhan14 student 0 Dec 11 15:35 test3
-rw-r--r--+ 1 yzhan14 student 0 Dec 11 15:35 test4
-rw-r--r--+ 1 yzhan14 student 6 Dec 11 15:35 test5

It shows that only test5 contains "hello", while test1 to test4 contains
nothing.
Is it what you required us to implement redirect?

Thank you,
Yanqiao
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.stevens.edu/pipermail/cs631apue/attachments/20151211/8dcb04ec/attachment.html>


More information about the cs631apue mailing list