Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!rochester!cornell!uw-beaver!ssc-vax!bact From: bact@ssc-vax.UUCP Newsgroups: comp.unix.wizards,comp.unix.questions,comp.lang.c Subject: Help! How 2 get info from C to Unix script Message-ID: <1569@ssc-vax.UUCP> Date: Wed, 2-Dec-87 18:49:57 EST Article-I.D.: ssc-vax.1569 Posted: Wed Dec 2 18:49:57 1987 Date-Received: Sun, 6-Dec-87 19:34:46 EST Organization: Boeing Aerospace Corp., Seattle WA Lines: 37 Keywords: C, Unix script, need help Xref: utgpu comp.unix.wizards:5372 comp.unix.questions:4633 comp.lang.c:5394 I've written a graphical file-selector (in C) which pops up on the screen, let's the user select a file with a mouse button, and then disappears off the screen. Is there a way that I can call my program within a Unix script and set a variable in the Unix script to equal the filename the user selected? What I would like to do is: (Unix script follows): xxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx FILE_PICKED=(call C program here, have it return filename) xxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx (where xxxxxxxxxx = other stuff) I've tried this approach, but it doesn't work. My only other alternative is to write 2 different scripts, where the first script does the stuff it needs to before getting the filename (call it script1), and another script which does the stuff it needs to after getting the filename (call it script 2). Then I can: script 1; file_selector; script 2. This is slow, cause it has to start up script 1, then the file_selector program, and finally script 2. Any help will be greatly appreciated... ...I'm not Archie, I'm David (using Archie's login) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~ "...You can't always get what you want..." ~ ~ Rolling Stones ~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- *********************************************************** * David Geary, Boeing Aerospace Co., Seattle, WA * * (206)773-5249. --I disclaim everything I've ever said--* ***********************************************************