What is the output when the following shell script executes?
Cat <<foobar
Hello foobar
foobar
A.
The contents of the filefoobar
B.
Hello
C.
No output but a file namedfoobar is created
D.
Hellofoobar
E.
Hellofoobar
What is the output when the following shell script executes?
Cat <<foobar
Hello foobar
foobar
What is the output when the following shell script executes?
Cat <<foobar
Hello foobar
foobar
A.
The contents of the filefoobar
B.
Hello
C.
No output but a file namedfoobar is created
D.
Hellofoobar
E.
Hellofoobar
E is also Hellofoobar. Please remove it to avoid confusion
yes . same answer 😀
The answer is “Hello foobar” with a space in between Hello and foobar
In the test I did in fedora 19 the correct answer is C, please test because the Red Hat fedora is due to redirection of the command cat
No output but a file namedfoobar is created
foobar = EOF. The final script:
Cat <<EOF
Hello foobar
EOF
displays: Hello foobar
so correct answer "D" (the answer is not enough space).