It's a bit more complicated than that; you can quote strings containg wildcards 
that you want passed as is. However, it is more common that you want the shell 
to do its thing.


-- 
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3
עַם יִשְׂרָאֵל חַי
נֵ֣צַח יִשְׂרָאֵ֔ל לֹ֥א יְשַׁקֵּ֖ר




________________________________________
From: IBM Mainframe Discussion List <[email protected]> on behalf of 
Paul Gilmartin <[email protected]>
Sent: Thursday, June 26, 2025 2:15 PM
To: [email protected] <[email protected]>
Subject: Re: FTP to z/OS PDS - filename extensions


External Message: Use Caution


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




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

Reply via email to