Smells like homework - where's your attempt at answers?
Salem
Posting Sage
11,531 posts since Dec 2005
Reputation Points: 5,862
Solved Threads: 953
Yeah... where are you taking this "quiz"?
You seem to have a lot of questions, and it is certainly hard to tell if its because you are trying to learn or cheat. If its just an online quiz - can you provide a link? I'd be interested in taking a try myself.
omrsafetyo
Junior Poster in Training
58 posts since Apr 2008
Reputation Points: 13
Solved Threads: 9
http://www.daniweb.com/forums/announcement113-2.html
Posting them is fine, so long as you show some effort.
You almost made it with
"# i tried, the output is a bit weird...."
but it would have been better if you'd actually copied and pasted what you tried.
Question 1 is answered in the manual
Salem
Posting Sage
11,531 posts since Dec 2005
Reputation Points: 5,862
Solved Threads: 953
Question 1. What if the same pattern also fits inside the "largest" pattern? i.e
pattern: A.*B
String: ABCDEFBGHIJK
Is AB matched, or is ABCDEFB matched?
Question 2:
What is th difference between 'A-Z' and '[A-Z]'? (Although there are other things in tr that should be used for this.)
Question 3:
Are you sure you copied it right as:
File substitution always happens on variable assignment.
doesn't seem right to me.
Question 4:
Knowing that handle>&handle redirects the first handle to whatever "stream" the second handle currently points to, and handle>outputStream redirects the listed handle to a newly created output stream, what do you think the answer is? Hint, the keyword in that question is marked.
Question 5:
Simply try it.
masijade
Industrious Poster
4,253 posts since Feb 2006
Reputation Points: 1,471
Solved Threads: 494