12-03-2012
New to Linux, have some simple question
Hi All,
Here is the problem: I have done a c++ code in Visual Studio 2010, it's a simple project that only have one main function which takes 2 parameters: an integer and a file that stores data. Now, I am asked to write a shell script in linux to execute my main function. I asked my professor about how to do this, he replies:
"Let's say you've created an executable called ‘test' that takes two arguments ‘file' and ‘id'. Then your script would be:
#!/bin/bash
test $1 $2"
my questions are:
1. is "test" the name of my cpp file or the name of my function?
2. if I have to pass a file as an argument, where should I place my data file?
overall, I just need some basic idea of how to execute my cpp file using shell script, please provide more detail if possible.
Thanks you all in advance. Greatly appreciated!
Best,
Eason Zhang
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Friends,
I did following exercise
$ echo '' > test
$ od -b test
$ echo "">test
$ od -b test
$echo > test
$od -b test
Every time I got the following output
0000000 012
0000001
But 012 is octal value for new line character .
Even though there is no apperent new line character... (6 Replies)
Discussion started by: j1yant
6 Replies
2. UNIX for Dummies Questions & Answers
Hi All,
I am new to UNIX Shell Scripting.
I want to know what is the difference between the following two statements.
if
and
if
Thanks & Regards (3 Replies)
Discussion started by: tvkamesh
3 Replies
3. UNIX for Dummies Questions & Answers
When i type cd etc/shadow it says that file or directory doesnt exist? Is there a way to show this or am i typing something wrong? :confused: (6 Replies)
Discussion started by: Corrail
6 Replies
4. UNIX for Dummies Questions & Answers
Ok what is BSD exactly? I know its a type of open source but what is it exactly? (1 Reply)
Discussion started by: Corrail
1 Replies
5. UNIX for Dummies Questions & Answers
I'm new to unix commands and am wondering how you could create a page with html tags in it. echo "<b>Test</b>" > test.html doesn't work because of the tags. How would I do this. (4 Replies)
Discussion started by: roger19
4 Replies
6. Programming
Hello. I'm a complete newbie to C programming. I have a C program that wasn't written by me where I need to write some wrappers around it to automate and make it easier for a client to use. The problem is that the program accepts standard input to control the program... I'm hoping to find a simple... (6 Replies)
Discussion started by: Xeed
6 Replies
7. IP Networking
I have 2 linux hosts running oracle RAC DB with multiple ethernet interfaces .
Host 1
netstat -tln |grep 6000
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 :::6000 :::* ... (1 Reply)
Discussion started by: gubbu
1 Replies
8. Red Hat
Cheers!
In /etc/syslog.conf, if an error type is not specified, is it logged anywhere (most preferable is it logged to /var/log/messages) or not?
To be more precise I am interested in error and critical level messages. At default these errors are not specified in syslog.conf, and I need to... (6 Replies)
Discussion started by: dr1zzt3r
6 Replies
9. Linux
This is a screenshot from "cockpit", a nice app of Fedora server,I can see from it disk,network,ram usage for host.
https://images2.imgbox.com/e5/7c/oJJqPcQe_o.png
The good thing is start preconfigured for host.
My question is..someone know a app like this which can monitor a entire... (0 Replies)
Discussion started by: Linusolaradm1
0 Replies
10. UNIX for Beginners Questions & Answers
Hello,
I am on a Mac and trying to clean up some monthly files with a very simple SED:
sed '3,10d;/<ACROSS>/,$d' input.txt > output.txt
(from the input, delete lines 3 - 10; then delete from the line containing <ACROSS> to the end of the file)
then output to output.txt
Even when I try... (2 Replies)
Discussion started by: verbatim
2 Replies
LEARN ABOUT DEBIAN
openscad-testrun
OPENSCAD-TESTRUN(1) General Commands Manual OPENSCAD-TESTRUN(1)
NAME
openscad-testrun - set up and run the OpenSCAD test suite
SYNOPSIS
openscad-testrun [options]
DESCRIPTION
This manual page documents briefly the openscad-testrun command.
openscad-testrun is a script that sets up a directory in which the OpenSCAD test suite (implemented in ctest) can be run by creating sym-
links to the system locations of the input data, and runs it. The created directory is not removed, but will contain the test results in
addition to the symlinks.
It is required as the test suite in its original form expects all the test input and output data in relative locations, and the typical
user has no write access to where the data resides. Future changes to the test suite might make it more flexible, removing the need for
this script.
OPTIONS
-d directory, --directory directory
Set up the tests in a directory called directory. By default, this is generated from the current date and time like openscad-
test-2012-02-15_13:37.
-n, --dry-run
Do not run the test suite, just set it up.
All additional arguments are passed on to ctest.
AUTHOR
The OpenSCAD test suite was written by Clifford Wolf, Marius Kintel, and others. The openscad-testrun script was written by chrysn.
This manual page was written by chrysn <chrysn@fsfe.org>, for the Debian project (and may be used by others).
2012-02-16 OPENSCAD-TESTRUN(1)