thanks for all the reply. I hate code with side-effects too. Hence, I
could not tell what "mv *" would do.
but it was a discussion with a co-worker and he likes this kind of tricks.
:)
On Wed, Oct 4, 2017 at 7:16 AM, Paul Heinlein wrote:
> On Tue, 3 Oct 2017, VY wrote:
>
> Thanks again for al
On Tue, 3 Oct 2017, VY wrote:
Thanks again for all the replies.
I have a further question on this.
Is doing "mv *" considered "bad coding"?
In general, no matter which language I do, I try to avoid any
side-effect.
It's certainly nothing I would do on purpose. :-) For instance, here
are t
On Tue, Oct 3, 2017 at 8:20 PM, VY wrote:
> Thanks again for all the replies.
>
> I have a further question on this.
>
> Is doing "mv *" considered "bad coding"?
>
> In general, no matter which language I do, I try to avoid any side-effect.
>
> It reduces readability in the code. Hard to debug
On Tue, Oct 3, 2017 at 8:20 PM, VY wrote:
> Thanks again for all the replies.
>
> I have a further question on this.
>
> Is doing "mv *" considered "bad coding"?
>
In a word, yes.
___
PLUG mailing list
PLUG@lists.pdxlinux.org
http://lists.pdxlinux.org/
Thanks again for all the replies.
I have a further question on this.
Is doing "mv *" considered "bad coding"?
In general, no matter which language I do, I try to avoid any side-effect.
It reduces readability in the code. Hard to debug when you have pages
after pages of code that consists
of a
Use to be a good 'test' for a Comp Sci class.
Before the class
touch a b c
mkdir d
In the class
mv *
On Tue, Oct 3, 2017 at 9:25 AM, VY wrote:
> Thanks for all the replies. I completely forgotten about "*" being
> interpreted by the shell.
> That makes sense now...
>
> thanks again!
>
>
>
Thanks for all the replies. I completely forgotten about "*" being
interpreted by the shell.
That makes sense now...
thanks again!
On Tue, Oct 3, 2017 at 9:16 AM, John Meissen wrote:
> The 'mv' command takes the last argument as the destination. The shell will
> expand the wildcard into a list
The 'mv' command takes the last argument as the destination. The shell will
expand the wildcard into a list before calling 'mv' (or performing it, as I
think it's actually built-in), so in your example
mv *
is equivalent to
mv a b c
> Dear All
>
> Yesterday, I was told of this usage of "mv
On Tue, 3 Oct 2017, VY wrote:
Dear All
Yesterday, I was told of this usage of "mv" and I could not figure
out why it would work. So I am sending out my question
Say I am in a directory with 3 sub-directories "a", "b" and "c".
I then type
bash> mv *
Directory "a" and "b" would move und
Dear All
Yesterday, I was told of this usage of "mv" and I could not figure out why
it would work.
So I am sending out my question
Say I am in a directory with 3 sub-directories "a", "b" and "c".
I then type
bash> mv *
Directory "a" and "b" would move under "c".
I re-read the man page fo
10 matches
Mail list logo