NEXT UP Edit Mode
Next: Return to my Home Page

Answers

  1. f
    This command also gives the file name and its current length.

  2. .,.+3d
    The '.' symbol means the current cursor line, so +3 is a range of lines from the current cursor line to three lines beyond that. The d on the end says delete this range.

  3. ?8/.7
    The'?' means search backwards from the current position. The '/' before the dot ('.') is required because otherwise the dot is a wild-card which matches any single character.

  4. $-9,$d
    The dollar ('$') symbol means end of file.

  5. / [0-9] [0-9] [0-9]
    Search forward to find three adjacent characters each in the range 0 to 9

  6. s/aa.*zz//
    The search string here starts with 'aa' which is followed by any number of single characters ('.*') and terminated by 'zz'. The substitute the search string for nothing - hence delete.

  7. g/&/s//and/g
    The center part of this line substitutes the '&' character for the word 'and'. The leading 'g' means for each line in the file, and the trailing 'g' means for each occurrence on the line.

NEXT UP previous
Next: Return to my Home Page