Need help Note Each question may contain one or more correct

Need help.
Note: Each question may contain one or more correct answers. 1) cat > file2 (a) filel content will be appended to file2 (b) filel and file2 will have same contert (c) syntax error (d) None of above 2) Which of these is the correct method for appending\"new\" into /test/partl file? (a) echo new> /test/part (b) echo new >> /test/partl (c) echo new |/test/partl (d) /test/part

Solution

1. cat < file1 >> file2 cat < file1 will usually write the file file1 to screen, but as you\'re redirecting the output using >> operator, which means the output of the previous command is concatenated to file2.

So, the answer is: (a). file1 content is appended to file2.

2. (a). echo new > /test/part1 will write the string new to the file /test/part1. is False.

(b). echo new >> /test/part1 will append the string new to the content in the file /test/part1. is True.

(c). echo new | test/part1 this will lead to an error, as the second part is not a command. False.

(d). /test/part1 < echo new will lead to an error. False.

3. (d) Background process can start a new subshell. True.

4. (b) Double quotes.

5. (a). Every unix process terminates with an exit value. True. And all the remaining options are false.

6. (c). 3.

7. (b). Counts the number of 1s in binary representation.

Need help. Note: Each question may contain one or more correct answers. 1) cat > file2 (a) filel content will be appended to file2 (b) filel and file2 will h

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site