"When the only tool you have is a pipe, everything looks like a filter."
-- Shmuel (Seymour J.) Metz http://mason.gmu.edu/~smetz3 ________________________________________ From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of Paul Gilmartin [0000000433f07816-dmarc-requ...@listserv.ua.edu] Sent: Thursday, November 5, 2020 3:42 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Gwyn's Maxim (was: FSUM7197 pax ...) https://secure-web.cisco.com/1A7riZAPpr7boeK8ALMZCZTcsWrAD-ueyShFiA0hGSb0JnXAB9iXit1YkpYeISqRcMkVid4NR0HzMd_kBWzPx2KH9Yox8M1rB0s3QuED6mXI_nXCeF9vkG6TE2i3TzaPjgoX1Agsr613PPvZr-vZNu64QzEOC8OfkrTBUkN_jdqrLS-KIkF8E8deFrT-ThadFUD-Xj-sYa4i_AJOZ9wLAbO-ta5AA8TQO0Cp_v8FnfQ0RayCU8b5rIYCBniyHGkj4l188oyX_cSAGJf2UUEmsmO6lzD_QlKgc3Q60vQaBG11euFAtWhpN76k074Pwm9ZBjuP5QJ_Kk3UpURu1B6pbGw-deceq7EmXEiJIrOtnSQH_Gj_O8ixdhCo2MxYd5Qtm3J7uBgMTNObxNxCds-ecj-cjG27DUCfiRLQoQ7UYUnnoTXk7gjGXHubqPZulogpQ/https%3A%2F%2Fopensource.com%2Fbusiness%2F14%2F12%2Flinux-philosophy On Thu, 5 Nov 2020 06:46:15 -0800, Charles Mills wrote: >What the heck were the UNIX designers thinking when they allowed the casual >creation of a filename of -x? There may be a legitimate reason why someone >would want to create a file named -x but if so, then *they* should be made to >jump through some small hoop and "escape" the name in some way. The innocent >victim who stumbles into this situation should not be the one made to jump >through hoops. Will UNIX allow the creation of a file named "rm *"? That could >have some interesting side effects. > Even worse, a file named "-rf *". This resembles the plaint of a JCL novice who has just encountered, painfully, the astonishing behavior of: //SYSUT1 DD DSN=&SYSUID..PDS(MEMBER),DISP=(OLD,DELETE) That should be fixed for DYNALLOC, JCL, TSO, globally by making the TU for member mutex with the TU for delete. Who volunteers to bell the RFE cat? Probably there's a "dusty deck" somewhere whose inexcusably clever author relied on the behavior and whose heirs haven't access to the source. >How did I inadvertently create a file named -x? I had a pax command > >pax -wzvf /my/archive.pax * > >I had an error that I thought might be solved by -x os390. Looking at the >above command I forgot that /my/archive.pax "went with" the -f and coded > >pax -wzvf -x os390 /my/archive.pax * > ... >Heck, if the shell is going to expand the * then it could generate a warning >"hey, did you know that one of your files has a name that looks just like a >switch?" > Shell doesn't know what's a file and what's a switch. That's the responsibility of the utility, even as JCL shouldn't know what PARM means: //STEP EXEC PGM=BPXBATCH,PARM='sudo rm -rf /' -- gil ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN