arg[0] is the program name, the rest of arg are any arguments you have. Ben Duncan wrote:
> Ok, now for my question of the day. > After 18 years in UNIX and 8 in linux, started getting serious on > developing my C skills. Most of revolves around Appgen stuff. > > Anyway, I wrote a C program to tell me what kind of application an > Appgen program is. Program is called typeprog. To wit: > > typeprog PDEF.OE07000 > > returns: > > "Program PDEF.OE070000 is a Maint and uses OE-INVCE file." > > Now, I would like to xpand that to use something like > > "typeprog `ls PDEF.IV*` " or " ls PDEF.IV | typeprog" > > as well. > > Now, I know argv[1] gives me the program name, but how do I go about > xpanding that to use the latter style as well as the first and determine > which > I have incoming and to walk the list given by the latter? > > > I know I will probably have to put a while loop in it, but as for the > rest, I am lost ... > -- Brett I. Holcomb [EMAIL PROTECTED] AKA Grunt <>< Registered Linux User #188143 Remove R777 to email _______________________________________________ Linux-users mailing list [EMAIL PROTECTED] Unsubscribe/Suspend/Etc -> http://www.linux-sxs.org/mailman/listinfo/linux-users
