Path: ...!weretis.net!feeder9.news.weretis.net!news.nk.ca!rocksolid2!i2pn2.org!.POSTED!not-for-mail From: jayjwa Newsgroups: comp.os.vms Subject: Re: Local Versus Global Command Options Date: Mon, 17 Feb 2025 18:46:49 -0500 Organization: Atr2 RG 2025 Message-ID: <878qq4m8wm.fsf@atr2.ath.cx> References: <67afe79c$0$719$14726298@news.sunsite.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: i2pn2.org; logging-data="539315"; mail-complaints-to="usenet@i2pn2.org"; posting-account="89hVqYo70kCHTMYtSf9dSYD3vPORA7Nv/5rEKG6jbrc"; User-Agent: Gnus/5.13 (Gnus v5.13) Cancel-Lock: sha1:TGcX/dwmwWGa3D7tE+ESvkW7bYw= X-Spam-Checker-Version: SpamAssassin 4.0.0 Bytes: 3335 Lines: 57 Lawrence D'Oliveiro writes: > Can you show us a simple C program that just prints out its command > arguments, and how it responds to some sample command lines? VMS seems to be alone in converting case. ✔≻ cat cmdlin.c /* A program to demo printing of command line args under various OSs. */ #include int main( int argc, char *argv[] ) { printf( "Did I hear you say %s?\n", argv[1] ); return 0; } ✔≻ gcc -o cmdlin cmdlin.c ✔≻ ./cmdlin Hello World Did I hear you say Hello? ✔≻ ./cmdlin "Hello World" Did I hear you say Hello World? @compile cmdlin.c KCC: CMDLIN "CMDLIN.C", line 9: [Note] Parameter "argc" not used (main+4, p.1 l.8): "Did I hear you say %s?\n", argv[1] ); return 0; } CMDLIN.PRE.1 CMDLIN.FAI.1 FAIL: CMDLIN @load cmdlin LINK: Loading @save cmdlin CMDLIN.EXE.2 Saved @cmdlin Hello World Did I hear you say Hello? @cmdlin "Hello World" Did I hear you say Hello World? c:\bcc32 -5 -ecmdlin.exe cmdlin.c c:\cmdlin Hello World Did I hear you say Hello? c:\cmdlin "Hello World" Did I hear you say Hello World? $ cc /version Compaq C V6.4-005 on OpenVMS VAX V7.3 $ cc cmdlin.c $ link cmdlin $ mcr DUA1:[JAYJWA.PROGRAMMING.C]cmdlin Hello World Did I hear you say hello? $ mcr DUA1:[JAYJWA.PROGRAMMING.C]cmdlin "Hello World" Did I hear you say Hello World? This matters with tools like curl (-O vs -o) and zip (-V and -v). -- PGP Key ID: 781C A3E2 C6ED 70A6 B356 7AF5 B510 542E D460 5CAE "The Internet should always be the Wild West!"