Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re^2: question for perl book & magazine authors

by chester (Hermit)
on Oct 19, 2005 at 21:57 UTC ( #501444=note: print w/ replies, xml ) Need Help??

in reply to Re: question for perl book & magazine authors
in thread question for perl book & magazine authors

In vim, the command :g/re/p (where g means "global", re is clearly "regex" and p means "print") will find all lines matching the regex and print them in a list. This was apparently true of vim's predecessors as well, but it's still a valid (and useful) command in vim today. See also Wikipedia.

Comment on Re^2: question for perl book & magazine authors
Download Code
Re^3: question for perl book & magazine authors
by Dominus (Parson) on Oct 21, 2005 at 14:54 UTC
    Says chester:
    In vim...
    The g/re/p command actually goes back to ed, which was the original Unix editor, back around 1972, and is still provided with all Unix systems. After ed came vi, the visual editor, with command syntax similar to ed's, and then vim, which is an improved version of vi.

    Early versions of Unix also had a gres command (perform a substitution on all matching lines) but it was obsoleted by sed and abandoned.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://501444]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (11)
As of 2015-06-02 20:49 GMT
Find Nodes?
    Voting Booth?

    What kind of chocolate gives you the most pleasure?

    Results (109 votes), past polls