Solved

make a shell

Posted on 1998-09-21
1
382 Views
Last Modified: 2010-08-05
Hi there,
I am writing a C++ program in Linux doing some enigineering stuff.  I want to make a shell in the program such that it can plot the graph by gnuplot automatically (or transform to eps format and display in ghostview) without exiting the program.

spawnl available in TC++ etc cannot be used in Linux, what can I use instead.  BTW, I dont want to quit the program striaght ahead. So execl is not a option...
0
Comment
Question by:oldjst
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 2

Accepted Solution

by:
JYoungman earned 30 total points
ID: 1638104
You can use popen("gnuplot", "w").   [man popen]

Write to it, "set output your-temp-file" and "set terminal postscript" to start with.  

When you're done, send the temporary file to the print spooler.

0

Featured Post

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The purpose of this article is to show how we can create Linux Mint virtual machine using Oracle Virtual Box. To install Linux Mint we have to download the ISO file from its website i.e. http://www.linuxmint.com. Once you open the link you will see …
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question