Sujet : Re: Useless Use Of Regexes
De : c186282 (at) *nospam* nnada.net (c186282)
Groupes : comp.os.linux.miscDate : 08. Apr 2025, 03:06:23
Autres entêtes
Message-ID : <EuednZ3kxtg8GWn6nZ2dnZfqnPQAAAAA@giganews.com>
References : 1 2 3 4 5
User-Agent : Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0
On 4/7/25 10:05 PM, Eli the Bearded wrote:
In comp.os.linux.misc, Lawrence D'Oliveiro <ldo@nz.invalid> wrote:
On 06 Apr 2025 08:40:54 GMT, Stéphane CARPENTIER wrote:
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.
Very presumptious to assume emacs style line editing, isn't it?
To go back in history, I type <ESC>k and then I'm at the start of the
line of the most recent command. On the current line I'd type <ESC>^
but <ESC><HOME> would work.
But really, I don't think it is proper to care about inefficent use of
commands at the command line. Go ahead and judge in a script or
documentation (or an example posted to Usenet), but what people do in
the privacy of their own shell is their business.
Just use nano ....