Solved

make a shell

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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

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…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

708 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now