Can't Import XML file into my project console through the terminal
Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Can't Import XML file into my project console through the terminal
Hi all,
I am trying to import an XML file into my project console via linux terminal. For that I have to execute two commands which are...
1)sh /home/spadmin/..../project console
(it is a terminal command, which is to launch my project console and wait for the console command as input)
2)import /home/spadmin/.../test.xml
(import the test file into my application through the console, it is not a terminal command, it is a console command)
However these two are working well if we execute them one by one like first one to launch the console and then give the second command with in that console to import xml file.
But if I want to execute them as a single command like "sh /home/spadmin/..../project console -c import /home/spadmin/.../test.xml" it is throwing the exception as "illegal state exception: No prototype context exists". I am in a situation to execute them like a single command like above mentioned. Please suggest me the solution. Ask me if you have any clarification regarding this scenario..
Thank you.
#!/bin/sh
sh /home/spadmin/..../project console
import /home/spadmin/.../test.xml
Hi Andy,
I have already tried the script like that, but when we execute the first command the console will open, that's fine but the second command also be treated as a terminal command but not as console command, it won't execute with in the console resulted by the first command. That's the problem. Every line is treated as a separate terminal command which is not the requirement.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.