Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
1. Create a series of commands for a grading program.
Create a grades file. Put a "tab" between the name and grade. Run these commands directed to a file (>>).
Sam Smith A
Harry Konik B
Mike Grep C
Ann Smith A
Zed Arf F
Beth Mon B
Tod Bar C
a. Sort the list by last name
b. Sort the list by grade
c. Display all student's with A's
d. Display the number of students
e. Display the three top students
f. Display the two lowest grades
g. Display the list with the last name first followed by the first name then the grade.
2. Relevant commands, code, scripts, algorithms:
sort, grep(?)
3. The attempts at a solution (include all code and scripts):
Ok, before I start, I really am not sure what it means by "tab." Does it mean an actual tab, or a colon?
4. Complete Name of School (University), City (State), Country, Name of Professor, and Course Number (Link to Course):
Brookdale Community College - Lincroft, New Jersey - United States - Dr. Rick Bournique- COMP 145
Note: Without school/professor/course information, you will be banned if you post here! You must complete the entire template (not just parts of it).
---------- Post updated 03-31-13 at 09:01 PM ---------- Previous update was 03-30-13 at 10:26 PM ----------
Ok I created a file "namesfile" with tabs inbetween the first and lastname like so:
My attempted solutions thus far:
a: b: d:
c, e, f, and g are giving me a hard time, but I am still trying to figure them out.
Write a shell script (to run on the Bourne shell) that runs an infinite loop to check every 5 seconds to report on who logs into and who logs out of a UNIX system. Without loss of practical significance of this little utility, we can ignore multiple logins from the same user during a time period of... (1 Reply)
Hi my friends
I am beginner unix programmer I have written small c++ program in text editor and I have change it mode to 555 to make it executable file to use it in unix O.P.
#include<iostream.h>
main()
{
cout<<"Hello World";
}
but some syntax erroe came for <<
can any one help... (5 Replies)
Hi,
I wanted to know if i can write a program using switches and signals, etc to trace execution of other unix program which calls c program internally.
If yes how? If not with signals and switches then are there any other methods apart from debugging with gdb/dbx. (3 Replies)
Hi,
i want to write a script that executes a program (exec?) .
this program then requires a filename as input.
how do i give it this input in the script so the program will be complete run and close by the script.
e.g.
exec prog.exe
program then asks for filename
"enter filename:"... (1 Reply)
Hello Geniuses of the unix world. please help, stupid chemist. I have the following script that I need to create a file. Doesnt make sense unless i explain this way: I need to create a file called summary.in I would like all these lines to be inserted however in the command line I would like the... (1 Reply)
I wrote a simple program that generates a random word 10,000,000 times.
I wrote it in python, then in C++ and compared the two completion times. The python script was faster! Is that normal? Why would the python script be faster? I was under the impression that C++ was faster. What are some of... (2 Replies)
I am trying to understand a program in a book and this program suppose to call other programs which are in the same folder, the other programs are called 'lu' and 'add' but for some reason when it gets to the last line of each case to call these programs there is an error message saying
./rolo:... (2 Replies)
Long story short: I'm working inside of a Unix SSH under a bash shell. I have to code a C program that generates a random number. Then I have to call the compiled C program with a Perl program to run the C program 20 times and put all the generated random #s into a text file, then print that text... (1 Reply)
Here's the assignment. I'll bold the parts that are rough for me. Unfortunately, that's quite a bit lol. The syntax is, of course, where my issues lie, for the most part. I don't have a lot of programming experience at all :/. I'd post what I've already done, but I'm so lost I really don't know... (1 Reply)
I created a program, so a kid can practice there math on it. It dispenses varies math problems and the kid must input an answer. I also want it to grade the work they have done, but I can't find the best place for it to print out the grade.
I have:
if ( $response =~ m/^/ ) {
$user_wants_to_quit... (1 Reply)