1,105,375 Community Members

Intoduction to Unix help Please

Member Avatar
ana_1234
Junior Poster in Training
55 posts since Aug 2010
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

I have to:
Run the grades program twice, so that it accepts the data in the files t1 and t2 as input for the two respective runs.

I ran the grades program, it asked me to enter digits, I have the t1 and t2 files, how do I make the program read the files with out coping and pasting the content of the file?

Send the output from these runs of the program to the output file

I still don't know how to do the first part so I just copied and pasted, the numbers from the file. but how do I sent the output to a output file?

Then Print a header to the output file before each run, with header text "Grades Test 1" and "Grades Test 2"

it should appear like this, Im so comfused
===================
Grades test 1
===================
[output from second test run of grades program]

===================
Grades test 2
===================
[output from second test run of grades program]

Member Avatar
ana_1234
Junior Poster in Training
55 posts since Aug 2010
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

I know I have to use the < and > operators but I have no clue how to capture the return of the program

Member Avatar
ana_1234
Junior Poster in Training
55 posts since Aug 2010
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

ok so I figured out how to run the program without copy and pasting but how do I run the grades program twice, so that it accepts the data in the files t1 and t2 as input for the two respective runs

Member Avatar
ana_1234
Junior Poster in Training
55 posts since Aug 2010
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

every time I try to put but t1 and t2 into the output.txt, t2 overwrites t1, HELP please

Member Avatar
sree_ec
Junior Poster
119 posts since Jan 2010
Reputation Points: 10 [?]
Q&As Helped to Solve: 15 [?]
Skill Endorsements: 0 [?]
 
0
 

every time I try to put but t1 and t2 into the output.txt, t2 overwrites t1, HELP please

#./a.out > outfile1.txt&
#./a.out > outfile2.txt

Note the & at the end of first command. It will run the first process in bg so that you can run the next process.
Is this what you wanted?

You
This article has been dead for over three months: Start a new discussion instead
Post:
Start New Discussion
View similar articles that have also been tagged: