'vi +/mail .login' not on SUN ?? - (nf)

mac at esl.UUCP mac at esl.UUCP
Wed Oct 29 12:19:04 AEST 1986


In article <732 at mips.UUCP> dce at mips.UUCP (David Elliott) writes:
>In article <38400002 at pbinfo.UUCP> michael at pbinfo.UUCP writes:
>>
>>	What is wrong?
>>
>>I tried on a SUN 3 to invoke the 'vi' (only for fun(:-) with
>>the command
>>
>>	vi +/mail .login
>>
>>which should (I think) bring up 'vi' with my .login and place
>>me to the first occurrence of the word "mail". Surprise!! It
>>said something like 'hit bottom without finding matching pattern',
>>although this word is definitively in my .login. (I invoked 'vi'
>>with 'vi .login' and did a '/mail', worked perfect.) I fiddled a 
>>little with " and ', but the result remained the same.
>>
>>	So, who is wrong: The SUN or I ??
>>
>>	Michael Schmidt
>
>
>When the '+/mail' command is executed, the editor is in 'ex' mode. That
>is, it's the same as having executed ex on the file and typing the command
>/mail. Now, when the editor starts up in ex mode, the current line is
>at the end of the file, so the search starts there. If the option
>nowrapscan is set, the search will stop (with the 'hit bottom' message
>if nothing is found) at the bottom of the file.
>
>	vi '+1;/pattern' file
>
>			David Elliott
>			decwrl!mips!dce

	Or vi +\?mail .login
	 (if all he wanted was a line with mail, rather than the First line
	 with mail.  Saves 3 characters (note the ; requires the ''s)
-- 
------------------------------------+-----------------------------------------+
| Michael Mc Namara                 |  MM MM MM    OO   SSS   AAA   II  CCCC  |
| ESL Incorporated                  |   M   M  M  O  O S         A   I C    C |
| ARPA: mac%esl.UUCP at ames.ARPA      |   M   M  M  O  O  SSS   AAAA   I C      |
|       mac%esl.UUCP at shasta.ARPA    |   M   M  M  O  O     S A   A   I C    C |
|       mac%esl.UUCP at lll-lcc.ARPA   |  MM   M  M   OO   SSS   AAA A III CCCC  |
------------------------------------+-----------------------------------------+
| Note: esl used to be called tflop; the path mac%tflop will still work awhile|
------------------------------------+-----------------------------------------+



More information about the Comp.unix.wizards mailing list