Re: Re: [ilugd] Shell Script:Help Required.
Raj Mathur <[email protected]> Wed, 1 Sep 2004 17:44:21 +0530
| Newsgroups | gmane.user-groups.linux.delhi.devel |
|---|---|
| Message-ID | <[email protected]> |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 >>>>> "Sandip" == Sandip Bhattacharya <[email protected]> writes: Sandip> [Please use ilug-dev for programming questions. CCing to Sandip> it. All future replies will only go there.] Sandip> On Wednesday 01 Sep 2004 4:12 pm, amitflu wrote: >> I need to use the name of the Standard output file provided by >> the user in a shell script. for example:- ./myscript.sh > >> amit.txt so I need to use "amit.txt" somewhere into my shell >> scipt. So please tell me how can i fetch it. Sandip> You cant. there is no concept of stand output Sandip> *file*. There is just standard output. If you want to Sandip> write to the file, dont use redirection - pass the file Sandip> name as a parameter to the script, and write to it. Well, actually you can -- remember the /proc filesystem? You can do pretty ghastly things with /proc/self/fd, but the question is, would you want to? Regards, - -- Raju - -- Raj Mathur [email protected] http://kandalaya.org/ GPG: 78D4 FC67 367F 40E2 0DD5 0FEF C968 D0EF CC68 D17F It is the mind that moves -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) Comment: Processed by Mailcrypt 3.5.8 <http://mailcrypt.sourceforge.net/> iD8DBQFBNb0cyWjQ78xo0X8RAkawAJ4sK8sjkMkteuXLZrp+NJe76/JSuACfQM9O tPntNCb97uNh4lqXwUvu8vU= =h7UM -----END PGP SIGNATURE-----