[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 and thanks for your feedback.

28 mars 2021, 21:27 de deblis@lionunicorn.co.uk:

> When you've used
>  & pattern
> to display lines containing your pattern, then
>  | . grep pattern > filename
> will apply the same filter to the lines selected by | ., where
> I've used . but you could use ^ or $ or a mark instead, as
> appropriate.
>
Indeed, I had noticed that (and even placed myself at the very beginning of the input and used "| $" instead in order to select everything).

However, I was wondering if there was an alternative when one doesn't need to reenter the same pattern twice for such a basic need...

No easy condensed way for that? :)

Best regards,
l0f4r0


Reply to: