Hi,
I am trying to do a Uni assignment on Unix, and I'm not quite sure of some of the questions, I was hoping I could get some help?
Thanks, here are the questions, and what i *think* the answers are:
Q1: Describe an efficient way to remove all trailing blanks (SPACE and TAB) at the end of all lines
A: somethign to do with $
Q2: How would you change all instances of multiple consecutive spaces to single space
A: :g/ /s// /g
Q3: How do you search for a word without regard to upper or lower case
A: :set ic
/'word'
Q4: Find out vi definitions for sentence, paragraph, and section, as related to the commands ), (, }, and ]], [[
A: ??
Q5: Suppose you want to search for the character ^M (RETURN) just before the end of any line. How would you tell VI to search for this? How would you delete all such patterns in your VI buffer with one global replace command?
A: ??
Thanks a lot
I am trying to do a Uni assignment on Unix, and I'm not quite sure of some of the questions, I was hoping I could get some help?
Thanks, here are the questions, and what i *think* the answers are:
Q1: Describe an efficient way to remove all trailing blanks (SPACE and TAB) at the end of all lines
A: somethign to do with $
Q2: How would you change all instances of multiple consecutive spaces to single space
A: :g/ /s// /g
Q3: How do you search for a word without regard to upper or lower case
A: :set ic
/'word'
Q4: Find out vi definitions for sentence, paragraph, and section, as related to the commands ), (, }, and ]], [[
A: ??
Q5: Suppose you want to search for the character ^M (RETURN) just before the end of any line. How would you tell VI to search for this? How would you delete all such patterns in your VI buffer with one global replace command?
A: ??
Thanks a lot