(Beginner) Run c++ .exe with input to file


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers (Beginner) Run c++ .exe with input to file
# 1  
Old 04-20-2009
(Beginner) Run c++ .exe with input to file

Hi, I've got this requirement for my homework assignment, but I'm not sure how to meet it:

In the comamnd line, I need to type
$ <exec-file> <input> <output_file_name>

Like:
test 1+2 out.txt

Which should execute test.exe passing in 1+2 and directing output to out.txt.

I know how to do:
$ ./<exec-file> > <output_file_name>
(in program)
$ 1+2
$ ctrl-C

But I need to do it as I showed above: "$ test 1+2 out.txt".

Also, for <input> there may be multiple inputs like:
test 1+2 4+5 6+7 ... 3+4 out.txt



Thanks
# 2  
Old 04-20-2009
No homework questions... Please read the rules!
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

How to run putty.exe file in server?

Hi, I want to run putty.exe in Solaris server.My main aim is to invoke the putty.exe in Solaris server from a web application(.jsp) deployed in the server so that putty terminal should open. Thanks in advance (11 Replies)
Discussion started by: chaithanyaa
11 Replies

2. Shell Programming and Scripting

Run .exe file with inputs file

Good morning .., I have a problem to run my object program. Before, I run my program in cygwin and there is no problem. When I tried in linux (ubuntu), the terminal said that space.exe : command not found. this is the code in my shell space.exe gr1 result space.exe: command not found... (2 Replies)
Discussion started by: weslyarfan
2 Replies

3. Shell Programming and Scripting

Beginner Need Help on perl input

Hi, I am beginner perl input I just want to know if I want to make a program that let user input a function such as input " < value " List all files that are less than value The current directory is used. eg input " < 5" list all file that less than 5 in current directory until user input "quit" ... (4 Replies)
Discussion started by: guidely
4 Replies

4. Programming

My exe takes more time for specied input

My application is coded in C++ and uses pro C to get data from oracle database. My executable file is taking more time to execute for some specified input. Is there any way to check where it spends the maximum time? (1 Reply)
Discussion started by: SamRoj
1 Replies

5. Programming

I have C++ exe file( no source code) and need to run many large dataset under unix, b

I have C++ exe file( no source code) and need to run many large dataset under unix, but how to know the memeroy usage for one dataset?http://www.codeproject.com/script/Forums/Images/New.gif I think "top" is not good and if using the profiler, it seems no free download, any ideas? (1 Reply)
Discussion started by: Danielwang1986
1 Replies

6. UNIX and Linux Applications

Is it possible to run .exe in unix

hi friends i want to know if its possible to run windows exe files in unix.... i know the file system in windows and unix are totally different. but is there any application which allows this???? (2 Replies)
Discussion started by: vikashtulsiyan
2 Replies

7. HP-UX

How to run .exe file

Hello, I have an test.exe file under a directory. When i execute the .exe file directory from the prompt, i get following error: $ test.exe <enter> ksh: test.exe: not found How do i solve this error? TIA, Ramesh (1 Reply)
Discussion started by: brap45
1 Replies

8. Linux

How to run .exe

Hai, is there any way to run an .exe file in unix environment . i have read that WINE HQ supports this concept but its very inconsistent and upto the user risk . but i tried WINE but iam not able to configure it can any one help me in this matter Regards Sanju (1 Reply)
Discussion started by: sanjustudy
1 Replies

9. UNIX for Dummies Questions & Answers

not able to run base64 exe

Hi, I have copied base64.exe under base64-1.3 folder and i am trying to run base64.exe from another folder called Request. But i am getting the following error message. mga.ksh: base64: not found Please let me know how to execute the base64.exe from a directory where it is not installed. ... (0 Replies)
Discussion started by: lotus123
0 Replies

10. Shell Programming and Scripting

Run an exe from different folder

Am trying to run a exe on my unix machine from a different folder. For instance, i have a perl file in a folder /home/asif/runprj.pl which runs a exe in a different folder /home/projects/cobsat/a.out and my perl file is something like this #!/usr/bin/perl... (1 Reply)
Discussion started by: Asif Ali
1 Replies
Login or Register to Ask a Question