Search Results

Search: Posts Made By: lazypeterson
Forum: Programming 05-01-2009
5,076
Posted By lazypeterson
Thanks! I changed some stuff around and got it to...
Thanks! I changed some stuff around and got it to work.

I'm having trouble now, again, with writing the output to both the screen and appending the same text file... it successfully appends to...
Forum: Programming 04-30-2009
5,076
Posted By lazypeterson
fopen() - don't know what I'm doing wrong
This code works fine when I use a command line argument for fopen()'s parameter, but when I change it to a filename, the program freezes upon compilation. input.txt is definitely there, so I can't...
1,417
Posted By lazypeterson
Programs not compiling successfully
Preface: this is not a homework question. However, my teacher gave us a review packet with some C coding, and for some reason none of the C programs are compiling. First I compiled them from the...
Forum: Programming 04-26-2009
1,854
Posted By lazypeterson
.....
.....
7,164
Posted By lazypeterson
Nevermind. egrep -iv...
Nevermind.


egrep -iv "$searchFirst":"$searchLast" contacts.txt > tempFile
mv tempFile contacts.txt


There's not a cleaner way of doing that, is there?
7,164
Posted By lazypeterson
Alright, nevermind. When I do contacts.txt >...
Alright, nevermind. When I do contacts.txt > contacts.txt it erases my contacts file. If I do


egrep -iv "$searchFirst":"$searchLast" contacts.txt | tee contacts.txt


It works, but I don't...
7,164
Posted By lazypeterson
Yeah, I overcomplicated it. egrep -iv...
Yeah, I overcomplicated it.


egrep -iv "$searchFirst":"$searchLast" contacts.txt > contacts.txt


Did the trick.
7,164
Posted By lazypeterson
Using awk to get a line number to delete, piping through sed
Alright, I'm sure there's a more efficient way to do this... I'm not an expert by any means. What I'm trying to do is search a file for lines that match the two input words (first name, last name) in...
1,666
Posted By lazypeterson
Marvellous. Thanks a bunch!
Marvellous. Thanks a bunch!
1,666
Posted By lazypeterson
I don't know why I was using two awk's... ...
I don't know why I was using two awk's...

Thanks for helping clean up my sloppy code. The only problem I'm having, at this point, is sorting the gradessorted file without the header (Name, Exam1,...
1,666
Posted By lazypeterson
Appending to a file without printing to screen
#!/bin/csh
awk 'BEGIN { print "Name Exam1 Exam2 Exam 3 Total Grade" }' grades | tee gradesorted
awk '{if ($2+$3+$4<50){grade="F"}else if ($2+$3+$4>49...
4,046
Posted By lazypeterson
Yes, it is.
Yes, it is.
4,046
Posted By lazypeterson
Grade Score Script Project
What I thought would be an extremely simple project has proven more difficult for me than I thought. Here are the parameters:

Thus far, I've been able to sort the final grades, but I'm having a...
Showing results 1 to 13 of 13

 
All times are GMT -4. The time now is 02:14 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy