[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to save filtered less results in a file or on stdout



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: