Solved

make a shell

Posted on 1998-09-21
1
360 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
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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
AWS RDS 3 84
nagios alerts 3 46
CentOS create a user with predefined MD5 Hashed password 17 85
Web resource - Man pages for SUSE Enterprise Linux 11 1 26
If you use Debian 6 Squeeze and you are tired of looking at the childish graphical GDM login screen that is used by default, here's an easy way to change it. If you've already tried to change it you've probably discovered that none of the old met…
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

777 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