Sujet : Re: Useless Use Of Regexes
De : ldo (at) *nospam* nz.invalid (Lawrence D'Oliveiro)
Groupes : comp.os.linux.miscDate : 07. Apr 2025, 22:39:58
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vt1gne$nigc$2@dont-email.me>
References : 1 2 3 4 5 6
User-Agent : Pan/0.162 (Pokrosvk)
On 06 Apr 2025 08:40:54 GMT, Stéphane CARPENTIER wrote:
Le 31-03-2025, Lawrence D'Oliveiro <ldo@nz.invalid> a écrit :
>
On 30 Mar 2025 22:04:45 GMT, Stéphane CARPENTIER wrote:
>
Yes, with the right option and/or with the right modification of the
command line. But it's easier and faster to just add a cat than to
find the "right" way to do it.
>
Give an example.
A lot of time I run cat to find some information in a file. And when the
file is bigger than expected, I'll just grep its output. Of course,
it's better to directly grep the file, but it's easier and faster to add
a grep at the end of the previous command than to either write directly
the right command or to go at the beginning of the line to remove the
cat and put grep instead. Mostly when the name of the file is long in a
far remote directory.
You do have command-line editing enabled, right? You just press the HOME
key (or CTRL/A) to go to the start of the line.