Search Results

Search: Posts Made By: Trellot
16,144
Posted By Trellot
Thanks Shamrock, I ended up having to edit the...
Thanks Shamrock, I ended up having to edit the source file to add the three headings then run this code that was presented to me earlier to get things to work:

head -2 "file" ; awk -f "script"...
16,144
Posted By Trellot
I've tried using an echo statement before the...
I've tried using an echo statement before the BEGIN command but that just repeats at the bottom over and over totaling the number of lines I have in the file.

Is there anyway to sort per line...
16,144
Posted By Trellot
Any ideas on how to sort my script without also...
Any ideas on how to sort my script without also sorting the headings? I just need field four to sort and just the numbers. Here is my script again:

BEGIN { printf("%8s%12s%9s\n", "Player",...
16,144
Posted By Trellot
So I tried your solution and it does sort the...
So I tried your solution and it does sort the file properly, however my heading does not show, rather line 4 (out of 6 lines) repeats itself at the top. What to do? thinking, thinking, thinking.......
16,144
Posted By Trellot
Will try this, thank you. Trellot
Will try this, thank you.

Trellot
16,144
Posted By Trellot
For example, I have this: BEGIN {...
For example, I have this:

BEGIN { printf("%8s%12s%9s\n", "Player", "Year", "RBIs")
printf("\n") }
{ printf("%8s%12s%10s\n", $1, $2, $4) }

then i type into the shell: awk...
16,144
Posted By Trellot
Using sort with awk script
I have a file with four fields and an awk script that strips out one field displaying the remaining three. I have added headings for each of these fields such as Player - Year - RBIs then below it...
7,012
Posted By Trellot
Figured it out...thanks. Trellot
Figured it out...thanks.

Trellot
7,012
Posted By Trellot
Right, but I'm not figuring out how I divide by 4...
Right, but I'm not figuring out how I divide by 4 (the number of elements) syntactically. So, like I have this:

......
{ printf("8s%15s\n", $1, $4); totRBIs+=$1; avgRBIs/4=$4 }

END {...
7,012
Posted By Trellot
Also, rest assured that I'm not just throwing all...
Also, rest assured that I'm not just throwing all of this on all of your good shoulders. I, too, am googling and the like for answers. Just so you all know :)

Trel
7,012
Posted By Trellot
I'm good so far, thanks everyone for the info...
I'm good so far, thanks everyone for the info about the tabs. Now I'm trying to calculate the average of a particular field. I know tot(and then the field name)+= will total it, but what about an...
7,012
Posted By Trellot
Ok, so I think I have the tab thing figured...
Ok, so I think I have the tab thing figured out...only thing is now that I can't seem to align the fields along the left side due to one word being quite longer than the others in the first field,...
7,012
Posted By Trellot
The link only brings me back to mine. Any...
The link only brings me back to mine. Any suggestions?

Trellot
7,012
Posted By Trellot
Setting the delimiter
Hello all,

How can I set TAB as the delimiter inside a script file that will manipulate another file? For example, let's say I have a file with four fields separated by tabs and each field has...
19,423
Posted By Trellot
I'm getting the following message: find:...
I'm getting the following message:

find: invalid argument `n*24' to `-atime'

Something I've done wrong here?

Trellot
19,423
Posted By Trellot
Searching files by last accessed time
How can I search for files by last accessed time? I want to see files accessed in the last 24 hours, for example...or even less time, maybe in the last 3 hours?

Thank you in advance,

Trellot
1,550
Posted By Trellot
And your suggestion worked great, thanks for your...
And your suggestion worked great, thanks for your input.

Trellot
1,550
Posted By Trellot
Thank you, Bobbygsk, I will try this. Much...
Thank you, Bobbygsk, I will try this.

Much appreciated,

Trellot
1,550
Posted By Trellot
Yowsers! Ok..ok..if that's the rule, fine. ...
Yowsers! Ok..ok..if that's the rule, fine. However, this is an online course I'm taking and the professor has already encouraged to use the net for assistance. It wasn't as if I was asking you to...
1,550
Posted By Trellot
Script help, please!
I am writing a script that will display my name and date, then a menu with 5 selections. Each selection should print its respective command to the screen. However, when I run the script and make a...
Forum: Cybersecurity 11-10-2007
51,510
Posted By Trellot
Hey, you just replied to a post nearly 4 years...
Hey, you just replied to a post nearly 4 years old....ha! Yet, here I am as well! :)
2,773
Posted By Trellot
displaying mutliple fields on command line
This is probably the dumbest question you guys can get, but I'm trying, as a complete noob, to display the unix calendar for all the months without Saturday and Sunday showing. How can I remove...
3,547
Posted By Trellot
Most definitely...
Most definitely...
1,997
Posted By Trellot
"Trellot bows...." Thanks again, Vgersh! ...
"Trellot bows...."

Thanks again, Vgersh! I've been scouring my textbook and my class forums for any help on these issues all weekend long...thanks for taking the pain away, hehe!

Trellot :)
3,547
Posted By Trellot
Awesome! Thanks Vgersh, it works great now! ...
Awesome! Thanks Vgersh, it works great now! WoW, what a great forum!! Glad I joined.

Trellot:b::D
Showing results 1 to 25 of 27

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