issue about `less` in ubuntu

ping song songpingemail at gmail.com
Wed Dec 18 09:02:38 UTC 2013


thanks.
but that's now what I liked...
I'd like always do search when files were loaded in an editor (vim) or
pager (less), instead of blindly thinking what keyword to search ...

so definitely vim is the way to go.


On Tue, Dec 17, 2013 at 3:02 PM, J <dreadpiratejeff at gmail.com> wrote:

> On Tue, Dec 17, 2013 at 1:09 PM, ping song <songpingemail at gmail.com>
> wrote:
> > less is so handy/quick...a swiss knife of file viewing.
> >
> > amount the so many features, there are 2 of them I use the most:
> >
> > search across multiple file : esc-/
> > show only the matched lines: &
> >
> > but a lot of time I want to do both at the same time: search across
> > multiples files and show me only the matched lines...
> >
> > is that really not supported?
>
> Why can you not do this with grep and less?
>
> grep "some string" file1 file2 file3 ... | less
>
> for example:
>
> grep "plugin" * | less
>
> (FYI, this was run against the contents of /usr/share/checkbox/jobs/)
>
> audio.txt.in:plugin: user-interact-verify
> audio.txt.in: package.name == 'gir1.2-gst-plugins-base-0.10' or
> package.name == 'gir1.2-gst-plugins-base-1.0'
> benchmarks.txt.in:plugin: local
> benchmarks.txt.in: plugin: shell
> cpu.txt.in:plugin: shell
> cpu.txt.in:plugin: shell
> cpu.txt.in:plugin: shell
> daemons.txt.in:plugin: shell
> daemons.txt.in:plugin: shell
> daemons.txt.in:plugin: shell
>
> --
> ubuntu-users mailing list
> ubuntu-users at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20131218/389c3695/attachment.html>


More information about the ubuntu-users mailing list