Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

"I'm not a god, I was misquoted." -- Lister, Red Dwarf


computers / comp.os.linux.misc / Re: Is there an interactive 'mv' command?

SubjectAuthor
* Is there an interactive 'mv' command?pH
`* Re: Is there an interactive 'mv' command?Rich
 +* Re: Is there an interactive 'mv' command?pH
 |+* Re: Is there an interactive 'mv' command?David W. Hodgins
 ||+* Re: Is there an interactive 'mv' command?Lew Pitcher
 |||`- Re: Is there an interactive 'mv' command?pH
 ||`- Re: Is there an interactive 'mv' command?pH
 |`- Re: Is there an interactive 'mv' command?Rich
 `* Re: Is there an interactive 'mv' command?Eli the Bearded
  `* Re: Is there an interactive 'mv' command?Rich
   +* Re: Is there an interactive 'mv' command?Eli the Bearded
   |`- Re: Is there an interactive 'mv' command?Eric Pozharski
   `* Re: Is there an interactive 'mv' command?Bit Twister
    `- Re: Is there an interactive 'mv' command?Eli the Bearded

1
Is there an interactive 'mv' command?

<skkbnc$pd8$1@dont-email.me>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=6171&group=comp.os.linux.misc#6171

 copy link   Newsgroups: comp.os.linux.misc
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: wNOSP...@gmail.org (pH)
Newsgroups: comp.os.linux.misc
Subject: Is there an interactive 'mv' command?
Date: Mon, 18 Oct 2021 17:43:09 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 15
Message-ID: <skkbnc$pd8$1@dont-email.me>
Injection-Date: Mon, 18 Oct 2021 17:43:09 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="cb8257d249130747947b1badd0a023c6";
logging-data="26024"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+ocuNqt+Sz6EXLWsq8IdCy3/jjFlhg2DI="
Summary: y/n to move each file
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:WkFUXGUp6kiEA4dTM6iXZNmZAjw=
 by: pH - Mon, 18 Oct 2021 17:43 UTC

I want to move selected files from a working directory to a sub-directory.
Rather than tediously doing it one file or similar groups of files at a time
I tried: "mv -i * backup_dir"
and it ended up just moving everything.

-i turns out to be just confirm before overwriting, so of course everything
got moved since it did not already exist in the destination. Dang.

I'm looking for a command that'll do the mv with a y/n query before each
move. Do there be such a thing?

I went down into "backup_dir" and did a "mv * .."
to put everything back again.

Pureheart in Aptos, CA

Re: Is there an interactive 'mv' command?

<skkcj0$38u$1@dont-email.me>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=6172&group=comp.os.linux.misc#6172

 copy link   Newsgroups: comp.os.linux.misc
Path: i2pn2.org!rocksolid2!news.neodome.net!news.mixmin.net!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: ric...@example.invalid (Rich)
Newsgroups: comp.os.linux.misc
Subject: Re: Is there an interactive 'mv' command?
Date: Mon, 18 Oct 2021 17:57:53 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 18
Message-ID: <skkcj0$38u$1@dont-email.me>
References: <skkbnc$pd8$1@dont-email.me>
Injection-Date: Mon, 18 Oct 2021 17:57:53 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="c56cfa395fdc2b3a5b41590e5d09be80";
logging-data="3358"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+ktv/M6nMhogPr7wDlaveT"
User-Agent: tin/2.0.1-20111224 ("Achenvoir") (UNIX) (Linux/3.10.17 (x86_64))
Cancel-Lock: sha1:0M7NHKIiFDIrDUssAo7f7slG8e0=
 by: Rich - Mon, 18 Oct 2021 17:57 UTC

pH <wNOSPAMp@gmail.org> wrote:
> I'm looking for a command that'll do the mv with a y/n query before
> each move. Do there be such a thing?

You can create one on the fly in Bash:

for name in files* files* files* ; do
read -p "Move $name?: " ANS
if [ "$ANS" == "Y" -o "$ANS" == "y" ] ; then
mv "$name" destination/
fi
done

For typing at the CLI, you would normally make it all one line like so:

for name in files* files* files* ; do read -p "Move $name?: " ANS ; if [ "$ANS" == "Y" -o "$ANS" == "y" ] ; then mv "$name" destination/ ; fi ; done

Re: Is there an interactive 'mv' command?

<skkdk2$7pd$1@dont-email.me>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=6173&group=comp.os.linux.misc#6173

 copy link   Newsgroups: comp.os.linux.misc
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: wNOSP...@gmail.org (pH)
Newsgroups: comp.os.linux.misc
Subject: Re: Is there an interactive 'mv' command?
Date: Mon, 18 Oct 2021 18:15:31 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 29
Message-ID: <skkdk2$7pd$1@dont-email.me>
References: <skkbnc$pd8$1@dont-email.me> <skkcj0$38u$1@dont-email.me>
Injection-Date: Mon, 18 Oct 2021 18:15:31 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="cb8257d249130747947b1badd0a023c6";
logging-data="7981"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+gJUXCvoLWJRRHK1z+DQCL+vnE6p/kaQg="
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:+THzTMZVPI9h4wD98AnYJl2zmG4=
 by: pH - Mon, 18 Oct 2021 18:15 UTC

On 2021-10-18, Rich <rich@example.invalid> wrote:
> pH <wNOSPAMp@gmail.org> wrote:
>> I'm looking for a command that'll do the mv with a y/n query before
>> each move. Do there be such a thing?
>
> You can create one on the fly in Bash:
>
> for name in files* files* files* ; do
> read -p "Move $name?: " ANS
> if [ "$ANS" == "Y" -o "$ANS" == "y" ] ; then
> mv "$name" destination/
> fi
> done
>
> For typing at the CLI, you would normally make it all one line like so:
>
> for name in files* files* files* ; do read -p "Move $name?: " ANS ; if [ "$ANS" == "Y" -o "$ANS" == "y" ] ; then mv "$name" destination/ ; fi ; done
>
>

Wow! Perfect! This worked wonderfully.

I think I'll make a function out of this and put it in my bashrc or
whereever it's supposed to be.

I could not find a man page for read except the 'C' file descriptor read.

thank-you again.
pH

Re: Is there an interactive 'mv' command?

<op.1bg2o62ba3w0dxdave@hodgins.homeip.net>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=6174&group=comp.os.linux.misc#6174

 copy link   Newsgroups: comp.os.linux.misc
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: dwhodg...@nomail.afraid.org (David W. Hodgins)
Newsgroups: comp.os.linux.misc
Subject: Re: Is there an interactive 'mv' command?
Date: Mon, 18 Oct 2021 14:52:08 -0400
Organization: A noiseless patient Spider
Lines: 13
Message-ID: <op.1bg2o62ba3w0dxdave@hodgins.homeip.net>
References: <skkbnc$pd8$1@dont-email.me> <skkcj0$38u$1@dont-email.me>
<skkdk2$7pd$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes
Content-Transfer-Encoding: 8bit
Injection-Info: reader02.eternal-september.org; posting-host="e31db199f330695f906310ef7896a8ba";
logging-data="30927"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX190rQmBA/8knCP6KOyGfLV7x8b8IOJ1fIk="
User-Agent: Opera Mail/12.16 (Linux)
Cancel-Lock: sha1:rZgSZuTGQ/gbCD3O1bj1RSdkN/4=
 by: David W. Hodgins - Mon, 18 Oct 2021 18:52 UTC

On Mon, 18 Oct 2021 14:15:31 -0400, pH <wNOSPAMp@gmail.org> wrote:
> I could not find a man page for read except the 'C' file descriptor read.

It's described in "man bash". To find it quickly, search in the man page output by
entering a slash (/) followed by "nchars" (without the quotes).

I picked nchars to search for, as it's a string unique to the read command.

Regards, Dave Hodgins

--
Change dwhodgins@nomail.afraid.org to davidwhodgins@teksavvy.com for
email replies.

Re: Is there an interactive 'mv' command?

<skkgn4$b3c$1@dont-email.me>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=6175&group=comp.os.linux.misc#6175

 copy link   Newsgroups: comp.os.linux.misc
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: lew.pitc...@digitalfreehold.ca (Lew Pitcher)
Newsgroups: comp.os.linux.misc
Subject: Re: Is there an interactive 'mv' command?
Date: Mon, 18 Oct 2021 19:08:20 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 19
Message-ID: <skkgn4$b3c$1@dont-email.me>
References: <skkbnc$pd8$1@dont-email.me> <skkcj0$38u$1@dont-email.me>
<skkdk2$7pd$1@dont-email.me> <op.1bg2o62ba3w0dxdave@hodgins.homeip.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 18 Oct 2021 19:08:20 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="fac0b5a49e9e2559956bfb6ee6213437";
logging-data="11372"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+Q14qlx1HxmwzFGf1spbCU8G+YUX6DdCo="
User-Agent: Pan/0.139 (Sexual Chocolate; GIT bf56508
git://git.gnome.org/pan2)
Cancel-Lock: sha1:7hnNsV/nD+Rz672+7Frt02MiwI8=
 by: Lew Pitcher - Mon, 18 Oct 2021 19:08 UTC

On Mon, 18 Oct 2021 14:52:08 -0400, David W. Hodgins wrote:

> On Mon, 18 Oct 2021 14:15:31 -0400, pH <wNOSPAMp@gmail.org> wrote:
>> I could not find a man page for read except the 'C' file descriptor
>> read.
>
> It's described in "man bash". To find it quickly, search in the man page
> output by entering a slash (/) followed by "nchars" (without the
> quotes).

The OP might find it interesting to read up on all the builtin commands in
bash. Same procedure, but substitute "^SHELL BUILTIN" for "nchars", as in
/^SHELL BUILTIN

HTH
--
Lew Pitcher
"In Skills, We Trust"

Re: Is there an interactive 'mv' command?

<skkhpn$dfu$1@dont-email.me>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=6176&group=comp.os.linux.misc#6176

 copy link   Newsgroups: comp.os.linux.misc
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: ric...@example.invalid (Rich)
Newsgroups: comp.os.linux.misc
Subject: Re: Is there an interactive 'mv' command?
Date: Mon, 18 Oct 2021 19:26:47 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 5
Message-ID: <skkhpn$dfu$1@dont-email.me>
References: <skkbnc$pd8$1@dont-email.me> <skkcj0$38u$1@dont-email.me> <skkdk2$7pd$1@dont-email.me>
Injection-Date: Mon, 18 Oct 2021 19:26:47 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="c56cfa395fdc2b3a5b41590e5d09be80";
logging-data="13822"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/a95u5rkUw3gnlkgH95Qgj"
User-Agent: tin/2.0.1-20111224 ("Achenvoir") (UNIX) (Linux/3.10.17 (x86_64))
Cancel-Lock: sha1:KBZqfAQbv/4PNzYv1uvKZrCkFdc=
 by: Rich - Mon, 18 Oct 2021 19:26 UTC

pH <wNOSPAMp@gmail.org> wrote:
> I could not find a man page for read except the 'C' file descriptor
> read.

It is a Bash built-in. man bash (or "help read" at the Bash CLI).

Re: Is there an interactive 'mv' command?

<eli$2110181942@qaz.wtf>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=6177&group=comp.os.linux.misc#6177

 copy link   Newsgroups: comp.os.linux.misc
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!panix!.POSTED.panix5.panix.com!qz!not-for-mail
From: *...@eli.users.panix.com (Eli the Bearded)
Newsgroups: comp.os.linux.misc
Subject: Re: Is there an interactive 'mv' command?
Date: Mon, 18 Oct 2021 23:43:02 -0000 (UTC)
Organization: Some absurd concept
Message-ID: <eli$2110181942@qaz.wtf>
References: <skkbnc$pd8$1@dont-email.me> <skkcj0$38u$1@dont-email.me>
Injection-Date: Mon, 18 Oct 2021 23:43:02 -0000 (UTC)
Injection-Info: reader1.panix.com; posting-host="panix5.panix.com:166.84.1.5";
logging-data="12507"; mail-complaints-to="abuse@panix.com"
User-Agent: Vectrex rn 2.1 (beta)
X-Liz: It's actually happened, the entire Internet is a massive game of Redcode
X-Motto: "Erosion of rights never seems to reverse itself." -- kenny@panix
X-US-Congress: Moronic Fucks.
X-Attribution: EtB
XFrom: is a real address
Encrypted: double rot-13
 by: Eli the Bearded - Mon, 18 Oct 2021 23:43 UTC

In comp.os.linux.misc, Rich <rich@example.invalid> wrote:
> You can create one on the fly in Bash:
>
> for name in files* files* files* ; do
> read -p "Move $name?: " ANS
> if [ "$ANS" == "Y" -o "$ANS" == "y" ] ; then
> mv "$name" destination/
> fi
> done

(This works in more than just bash, but Rich knows that.)

> For typing at the CLI, you would normally make it all one line like so:

What? Why? Multiple lines commands at the prompt have all the "easy to
read and see your mistakes" advantages of multiple line commands in
scripts.

For _further_ readability, I set PS2 to be a tab, so that all my
additional lines are indented.

Just for variety, here's how I'd do that sort of thing (ksh for me):

for name in files* files* files; do
printf "Move %s ?\n" "$name"
read ans
case "$ans" in
[yY]*) mv "$name" destination/ ;;
esac
done

That's "no" as default. If I wanted "yes" to be default case,
I'd write it like this:

case "$ans" in
[nN]*) : do nothing ;;
*) mv "$name" destination/ ;;
esac

I'm a big user of case instead of OR conditions in test or
if-else pairs. And using the : no-op command.

Elijah
------
uses PS1 in the form ": ... ; " with changing ... info

Re: Is there an interactive 'mv' command?

<skl42u$8as$1@dont-email.me>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=6178&group=comp.os.linux.misc#6178

 copy link   Newsgroups: comp.os.linux.misc
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: ric...@example.invalid (Rich)
Newsgroups: comp.os.linux.misc
Subject: Re: Is there an interactive 'mv' command?
Date: Tue, 19 Oct 2021 00:38:54 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 23
Message-ID: <skl42u$8as$1@dont-email.me>
References: <skkbnc$pd8$1@dont-email.me> <skkcj0$38u$1@dont-email.me> <eli$2110181942@qaz.wtf>
Injection-Date: Tue, 19 Oct 2021 00:38:54 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="a48f1c27829bc78fd28350d1f4427258";
logging-data="8540"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+Rj1fkk/JW5gpNAAn5jsRc"
User-Agent: tin/2.0.1-20111224 ("Achenvoir") (UNIX) (Linux/3.10.17 (x86_64))
Cancel-Lock: sha1:pimz3eS9R+7qx3wqR2O65VmnsPY=
 by: Rich - Tue, 19 Oct 2021 00:38 UTC

Eli the Bearded <*@eli.users.panix.com> wrote:
> In comp.os.linux.misc, Rich <rich@example.invalid> wrote:
>> For typing at the CLI, you would normally make it all one line like so:
>
> What? Why? Multiple lines commands at the prompt have all the "easy to
> read and see your mistakes" advantages of multiple line commands in
> scripts.

Besides invoking an editor on the current CLI being entered, is there a
way to return to a previous line to fix a mistake after one's gone on
to a subsequent line? I enter these single line because then if I do
need to edit something near the front, at least I can run back in the
readline buffer and edit the front.

But if there's a way to jump back and edit a previous line, please
enlighten me.

> I'm a big user of case instead of OR conditions in test or if-else
> pairs. And using the : no-op command.

Yes, and I've done the same myself for my scripts. I simply didn't
think about using 'case' when writing up my response.

Re: Is there an interactive 'mv' command?

<eli$2110191658@qaz.wtf>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=6179&group=comp.os.linux.misc#6179

 copy link   Newsgroups: comp.os.linux.misc
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!panix!.POSTED.panix5.panix.com!qz!not-for-mail
From: *...@eli.users.panix.com (Eli the Bearded)
Newsgroups: comp.os.linux.misc
Subject: Re: Is there an interactive 'mv' command?
Date: Tue, 19 Oct 2021 20:58:08 -0000 (UTC)
Organization: Some absurd concept
Message-ID: <eli$2110191658@qaz.wtf>
References: <skkbnc$pd8$1@dont-email.me> <skkcj0$38u$1@dont-email.me> <eli$2110181942@qaz.wtf> <skl42u$8as$1@dont-email.me>
Injection-Date: Tue, 19 Oct 2021 20:58:08 -0000 (UTC)
Injection-Info: reader1.panix.com; posting-host="panix5.panix.com:166.84.1.5";
logging-data="25536"; mail-complaints-to="abuse@panix.com"
User-Agent: Vectrex rn 2.1 (beta)
X-Liz: It's actually happened, the entire Internet is a massive game of Redcode
X-Motto: "Erosion of rights never seems to reverse itself." -- kenny@panix
X-US-Congress: Moronic Fucks.
X-Attribution: EtB
XFrom: is a real address
Encrypted: double rot-13
 by: Eli the Bearded - Tue, 19 Oct 2021 20:58 UTC

In comp.os.linux.misc, Rich <rich@example.invalid> wrote:
> Besides invoking an editor on the current CLI being entered, is there a
> way to return to a previous line to fix a mistake after one's gone on
> to a subsequent line? I enter these single line because then if I do
> need to edit something near the front, at least I can run back in the
> readline buffer and edit the front.

I guess that's a valid reason. I control-c out and cut-paste to repeat
and fix (or invoke an editor with 'escape-v' because I live in
"set -o vi" world.)

> But if there's a way to jump back and edit a previous line, please
> enlighten me.

"fc -e ed for" not your style then? :^)

Elijah
------
uses "fc" commands via one character aliases

Re: Is there an interactive 'mv' command?

<sko4p3$hss$1@dont-email.me>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=6180&group=comp.os.linux.misc#6180

 copy link   Newsgroups: comp.os.linux.misc
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: wNOSP...@gmail.org (pH)
Newsgroups: comp.os.linux.misc
Subject: Re: Is there an interactive 'mv' command?
Date: Wed, 20 Oct 2021 04:09:07 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 15
Message-ID: <sko4p3$hss$1@dont-email.me>
References: <skkbnc$pd8$1@dont-email.me> <skkcj0$38u$1@dont-email.me>
<skkdk2$7pd$1@dont-email.me> <op.1bg2o62ba3w0dxdave@hodgins.homeip.net>
Injection-Date: Wed, 20 Oct 2021 04:09:07 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="0fed89abe8122d4360eb17b44f8b198f";
logging-data="18332"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+DOlGmE2pPRxcd8t7mJa/fitvDHXsFj64="
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:T/gMTMplPIPbmnvmUXq1h8BpjxY=
 by: pH - Wed, 20 Oct 2021 04:09 UTC

On 2021-10-18, David W. Hodgins <dwhodgins@nomail.afraid.org> wrote:
> On Mon, 18 Oct 2021 14:15:31 -0400, pH <wNOSPAMp@gmail.org> wrote:
>> I could not find a man page for read except the 'C' file descriptor read.
>
> It's described in "man bash". To find it quickly, search in the man page output by
> entering a slash (/) followed by "nchars" (without the quotes).
>
> I picked nchars to search for, as it's a string unique to the read command.
>
> Regards, Dave Hodgins
>

Ah! It's a bash built-in. Thank-you for the tip.

pH

Re: Is there an interactive 'mv' command?

<sko4se$hss$2@dont-email.me>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=6181&group=comp.os.linux.misc#6181

 copy link   Newsgroups: comp.os.linux.misc
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: wNOSP...@gmail.org (pH)
Newsgroups: comp.os.linux.misc
Subject: Re: Is there an interactive 'mv' command?
Date: Wed, 20 Oct 2021 04:10:54 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 21
Message-ID: <sko4se$hss$2@dont-email.me>
References: <skkbnc$pd8$1@dont-email.me> <skkcj0$38u$1@dont-email.me>
<skkdk2$7pd$1@dont-email.me> <op.1bg2o62ba3w0dxdave@hodgins.homeip.net>
<skkgn4$b3c$1@dont-email.me>
Injection-Date: Wed, 20 Oct 2021 04:10:54 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="0fed89abe8122d4360eb17b44f8b198f";
logging-data="18332"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX188IhomOvbFGPbEaDEiQbdFRkUZHtS0Brk="
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:qIICUkwHNPFWKyfkKJ3/TDjMTSY=
 by: pH - Wed, 20 Oct 2021 04:10 UTC

On 2021-10-18, Lew Pitcher <lew.pitcher@digitalfreehold.ca> wrote:
> On Mon, 18 Oct 2021 14:52:08 -0400, David W. Hodgins wrote:
>
>> On Mon, 18 Oct 2021 14:15:31 -0400, pH <wNOSPAMp@gmail.org> wrote:
>>> I could not find a man page for read except the 'C' file descriptor
>>> read.
>>
>> It's described in "man bash". To find it quickly, search in the man page
>> output by entering a slash (/) followed by "nchars" (without the
>> quotes).
>
> The OP might find it interesting to read up on all the builtin commands in
> bash. Same procedure, but substitute "^SHELL BUILTIN" for "nchars", as in
> /^SHELL BUILTIN
>
>
> HTH

I've jotted this down as my next learning task--if only I can retain it
all--thanks!
pH

Re: Is there an interactive 'mv' command?

<slrnsmvgfl.9gi.whynot@orphan.zombinet>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=6182&group=comp.os.linux.misc#6182

 copy link   Newsgroups: comp.os.linux.misc
Path: i2pn2.org!i2pn.org!news.swapon.de!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: why...@pozharski.name (Eric Pozharski)
Newsgroups: comp.os.linux.misc
Subject: Re: Is there an interactive 'mv' command?
Date: Wed, 20 Oct 2021 07:15:01 +0000
Organization: A noiseless patient Spider
Lines: 30
Message-ID: <slrnsmvgfl.9gi.whynot@orphan.zombinet>
References: <skkbnc$pd8$1@dont-email.me> <skkcj0$38u$1@dont-email.me>
<eli$2110181942@qaz.wtf> <skl42u$8as$1@dont-email.me>
<eli$2110191658@qaz.wtf>
Injection-Info: reader02.eternal-september.org; posting-host="edf7040ebfbfc21c82131ac5ff1b5ed6";
logging-data="25434"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+zO/vIAuS2YUs3Yyww10el"
User-Agent: slrn/pre1.0.0-18 (Linux)
Cancel-Lock: sha1:grnbVkt7UKm0Pm5t0OuLHQX6kVY=
 by: Eric Pozharski - Wed, 20 Oct 2021 07:15 UTC

with <eli$2110191658@qaz.wtf> Eli the Bearded wrote:
> In comp.os.linux.misc, Rich <rich@example.invalid> wrote:

>> Besides invoking an editor on the current CLI being entered, is there
>> a way to return to a previous line to fix a mistake after one's gone
>> on to a subsequent line? I enter these single line because then if I
>> do need to edit something near the front, at least I can run back in
>> the readline buffer and edit the front.
> I guess that's a valid reason. I control-c out and cut-paste to repeat
> and fix (or invoke an editor with 'escape-v' because I live in "set -o
> vi" world.)

Or (vi-speak here) "<Esc>o" or "<Esc>O" (because I live in zsh world,
just checked bash doesn't (or I'm missing something here) (also, no idea
how to do it with emacs-mode)).

>> But if there's a way to jump back and edit a previous line, please
>> enlighten me.
> "fc -e ed for" not your style then? :^)

(zsh again, no idea how to do it in bash or emacs-mode) "-" recalls
previos *command*, "k" goes to previous *line* (in multi-line), then to
last line command-wise. Just have to keep in mind (and constantly) --
"<Enter>" executes command right now ("r<Enter>" is fine though).

*CUT*

--
Torvalds' goal for Linux is very simple: World Domination
Stallman's goal for GNU is even simpler: Freedom

Re: Is there an interactive 'mv' command?

<slrnsmvuph.56j6.BitTwister@wb.home.test>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=6183&group=comp.os.linux.misc#6183

 copy link   Newsgroups: comp.os.linux.misc
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: BitTwis...@mouse-potato.com (Bit Twister)
Newsgroups: comp.os.linux.misc
Subject: Re: Is there an interactive 'mv' command?
Date: Wed, 20 Oct 2021 06:19:11 -0500
Organization: A noiseless patient Spider
Lines: 24
Message-ID: <slrnsmvuph.56j6.BitTwister@wb.home.test>
References: <skkbnc$pd8$1@dont-email.me> <skkcj0$38u$1@dont-email.me>
<eli$2110181942@qaz.wtf> <skl42u$8as$1@dont-email.me>
Injection-Info: reader02.eternal-september.org; posting-host="d76b170477693766f21a8e054dc8f970";
logging-data="1765"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+HsV0PZP+WlsVcGO3Mw9mxdUTi1MWI0Xo="
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:4jiXN+WxkjhFiKtiOVcVM4tO+U4=
 by: Bit Twister - Wed, 20 Oct 2021 11:19 UTC

On Tue, 19 Oct 2021 00:38:54 -0000 (UTC), Rich wrote:
> Eli the Bearded <*@eli.users.panix.com> wrote:
>> In comp.os.linux.misc, Rich <rich@example.invalid> wrote:
>>> For typing at the CLI, you would normally make it all one line like so:
>>
>> What? Why? Multiple lines commands at the prompt have all the "easy to
>> read and see your mistakes" advantages of multiple line commands in
>> scripts.
>
> Besides invoking an editor on the current CLI being entered, is there a
> way to return to a previous line to fix a mistake after one's gone on
> to a subsequent line? I enter these single line because then if I do
> need to edit something near the front, at least I can run back in the
> readline buffer and edit the front.

As I miss-understand it setting the VISUAL environment variable to the
desired editor of choice allows you to use that editor commands for editing.

Example: ]$ echo $EDITOR
EMACS
allows me to use emacs commands at the prompt.

Re: Is there an interactive 'mv' command?

<eli$2110201513@qaz.wtf>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=6184&group=comp.os.linux.misc#6184

 copy link   Newsgroups: comp.os.linux.misc
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!panix!.POSTED.panix5.panix.com!qz!not-for-mail
From: *...@eli.users.panix.com (Eli the Bearded)
Newsgroups: comp.os.linux.misc
Subject: Re: Is there an interactive 'mv' command?
Date: Wed, 20 Oct 2021 19:14:20 -0000 (UTC)
Organization: Some absurd concept
Message-ID: <eli$2110201513@qaz.wtf>
References: <skkbnc$pd8$1@dont-email.me> <eli$2110181942@qaz.wtf> <skl42u$8as$1@dont-email.me> <slrnsmvuph.56j6.BitTwister@wb.home.test>
Injection-Date: Wed, 20 Oct 2021 19:14:20 -0000 (UTC)
Injection-Info: reader1.panix.com; posting-host="panix5.panix.com:166.84.1.5";
logging-data="16938"; mail-complaints-to="abuse@panix.com"
User-Agent: Vectrex rn 2.1 (beta)
X-Liz: It's actually happened, the entire Internet is a massive game of Redcode
X-Motto: "Erosion of rights never seems to reverse itself." -- kenny@panix
X-US-Congress: Moronic Fucks.
X-Attribution: EtB
XFrom: is a real address
Encrypted: double rot-13
 by: Eli the Bearded - Wed, 20 Oct 2021 19:14 UTC

In comp.os.linux.misc, Bit Twister <BitTwister@mouse-potato.com> wrote:
> On Tue, 19 Oct 2021 00:38:54 -0000 (UTC), Rich wrote:
> > Besides invoking an editor on the current CLI being entered, is there a
> > way to return to a previous line to fix a mistake after one's gone on
> As I miss-understand it setting the VISUAL environment variable to the
> desired editor of choice allows you to use that editor commands for editing.

What if you don't want to invoke the editor? "Besides invoking an
editor" was the question.

> Example: ]$ echo $EDITOR
> EMACS
> allows me to use emacs commands at the prompt.

What shell? The bash I have installed here will use VISUAL, EDITOR, and
then emacs in that order according to the manpage. Unless you use the fc
command to manipulate history, then it's FCEDIT, EDITOR or vi. In ksh93,
VISUAL, EDITOR, vi to edit history when "set +vi" is on, otherwise (I
think) HISTEDIT, FCEDIR, or ed.

I don't know what zsh, et al., do.

Elijah
------
is fine with ed, and prefers it to (some) linux using nano as default editor

1
server_pubkey.txt

rocksolid light 0.9.7
clearnet tor