How to set cursor in editor to pattern given on command line?

James Wilkinson fedora at aprilcottage.co.uk
Tue Nov 3 23:01:38 UTC 2009


Frantisek Hanzlik wrote:
> I have rather general problem than Fedora specific:
> is there some simple (the simpler the better) console editor,
> in which is possible to specify string (or, better, pattern) on
> its command line so that editor after start will locate in edited
> file this pattern and will set cursor on it?
> 
> Just something as "+/{pattern}" option in vim editor does.

How does
nano +100 /etc/services
look to you? (^X means ctrl-X)

man nano for more details. If you don’t have it installed, it’s in the
“nano” package (what a surprise).

Hope this helps,

James.

-- 
E-mail:     james@ | “My aunt’s camel has fallen in the mirage.”
aprilcottage.co.uk |     -- “Soul Music”, Terry Pratchett.




More information about the users mailing list