LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-14-2008, 09:56 AM   #1
FlowState
LQ Newbie
 
Registered: Jul 2005
Distribution: Gentoo, LFS
Posts: 13

Rep: Reputation: 0
Using command output as file input


I have an application which requires a XML configuration file as one of it's arguments.

Code:
application -c config.xml
I would like to dynamically execute new instances of this application, with a slightly modified configuration for each run. However, I don't want to dump each configuration into a file before feeding it to the application. Rather, I want to pass the xml data across the command line like:

Code:
application -c '<xml>...</xml>'
Now, obviously this won't work, since the application is looking for a string containing the filename, not the file contents itself.

So I'm curious if there is any possible method of wrapping the xml data in some kind of "psuedo-file" that can be fopen()'ed from the application as if it was a regular file"?
 
Old 05-14-2008, 07:30 PM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,369

Rep: Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753Reputation: 2753
Well, I doubt that you're typing in the xml manually, so presumably this is being called from another prog, so make that prog create the file.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
cp command failing for large files - Input/Output error googs Linux - General 5 08-09-2012 12:28 PM
how to redirect the output of find command to input of egrep babu198649 Linux - Newbie 2 12-27-2007 03:50 AM
Can't rm file with Input/Output error drlaz Linux - General 0 02-23-2005 06:06 PM
how to use the output of a file for input of a command sneak Linux - General 2 05-12-2004 09:21 AM
logging all keyboard input/output to a file div Linux - General 0 02-20-2001 05:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:21 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration