Re: How to save filtered less results in a file or on stdout
- To: Debian User <debian-user@lists.debian.org>
- Subject: Re: How to save filtered less results in a file or on stdout
- From: l0f4r0@tuta.io
- Date: Sun, 4 Apr 2021 11:49:34 +0200 (CEST)
- Message-id: <[🔎] MXRHP-P--B-2@tuta.io>
- In-reply-to: <20210329012520.GA9715@axis.corp>
- References: <MWu7FH7--3-2@tuta.io> <20210328192740.GA24431@axis.corp> <MWv-rRf--3-2@tuta.io> <20210329012520.GA9715@axis.corp>
Hi David,
29 mars 2021, 03:25 de deblis@lionunicorn.co.uk:
> . type & again,
> . UpArrow to recall this latest pattern that you're happy with,
> . LeftDrag the mouse to copy the pattern,
> . Backspace to rubout the line (the & remains there),
> . type | and respond appropriately to the mark: prompt,
> . type your shell command:
> . grep '
> . paste the pattern with whichever button you use
> . ' > filename
>
> Using the ' quote will cater for most patterns, though you
> might have to adjust for any backslashes in the pattern,
> and so on, using Left/RightArrow, or even use " if the
> pattern itself contains ' characters.
>
> I tend to paste with Shift-Insert (needs less hand-eye coordination).
>
It works indeed.
I just thought there was an immediate, simple and dedicated command for that.
I suppose everyone's needs/workflows are different ;)
Thanks & Best regards,
l0f4r0
Reply to: