On 2015-11-05 05:24, Ben Finney wrote: > A very common command to issue, then, is “actually show me the line > of text I just specified”; the ‘p’ (for “print”) command. > > Another very common command is “find the text matching this pattern > and perform these commands on it”, which is ‘g’ (for “global”). The > ‘g’ command addresses text matching a regular expression pattern, > delimited by slashes ‘/’. > > So, for users with feeble human brains incapable of remembering > perfectly the entire content of the text while it changes and > therefore not always knowing exactly which lines they wanted to > operate on without seeing them all the time, a very frequent > combination command is: > > g/RE/p
Though since the default action for g/ is to print the line, I've always wondered why the utility wasn't named just "gre" $ ed myfile.txt g/re [matching lines follow] q $ -tkc (the goofball behind https://twitter.com/ed1conf ) -- https://mail.python.org/mailman/listinfo/python-list