On Thu, 26 Jun 2025 17:34:15 +0000, Farley, Peter wrote:

>Never mind, that does not work either.  Not sure what the “right” way would be.
>
Basic rule: The POSIX shell *always* performs expansion
identically before invoking any command.  This is remarkably
consistent and economical, but defies the expectations of
programmers trained in other operating systems.

    823 $ ls -1
    bar.txt
    foo.txt
    824 $ set -x
    825 $ mv *.txt *
    -bash 688+ mv bar.txt foo.txt bar.txt foo.txt
    mv: target 'foo.txt': Not a directory
    826 $

>From: Farley, Peter
>Sent: Thursday, June 26, 2025 1:15 PM
>
>Shouldn’t that “mv” command have an additional period in the second argument 
>to delete the extension?
>
>mv *.txt *.

-- 
gil

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to