Search Results

Search: Posts Made By: Ironguru
3,138
Posted By Ironguru
cut -d ":" -f 2-3 works_on > temp.txt awk -F...
cut -d ":" -f 2-3 works_on > temp.txt
awk -F ':' '$3==$var3 {sum+=$2} END{ print "Total : sum}' temp.txt


since 15 can change then it would have to be a variable. $3 is the 3rd column...
3,138
Posted By Ironguru
Awk to add selected row column data
Looks at the most efficient way to add up the column of data based off of the rows.

Random data
Name-Number-ID
Sarah-2.0-15
Bob-6.3-15
Sally-1.0-10
James-1.0-10
Scotty-10.7-15

So I would...
12,107
Posted By Ironguru
I am trying to present the Data from the 3rd file...
I am trying to present the Data from the 3rd file only. The files are more like a database, so I was trying to do the same as I would with them.

files look like the following:
...
12,107
Posted By Ironguru
Thank you very much, :b: ---------- Post...
Thank you very much, :b:

---------- Post updated at 09:40 PM ---------- Previous update was at 08:55 PM ----------

I ran into a problem where if the text field contains the same variable in the...
12,107
Posted By Ironguru
Thank you! If I wanted to store the awk output as...
Thank you! If I wanted to store the awk output as a variable so that I can pass it into another awk statement.


var = $(awk -F ":" '/1:/ {print "Name: ", $1}' File)
correct?

edit: syntax
12,107
Posted By Ironguru
Grep to isolate a text file line and Awk to select a word?
I am looking at using grep to locate the line in the text file and them use awk to select a word or words out of it.

I know awk needs -v to allow a variable to be used, but also needs -F to allow...
1,701
Posted By Ironguru
Thank you, I feel kinda dumb not noticing all the...
Thank you, I feel kinda dumb not noticing all the brackets were wrong :wall:
1,701
Posted By Ironguru
IF loop syntax error
I am trying to run a menu option though IF loops. I keep getting errors not allowed the menu to be processed correctly. Currently it will accept the first 2 statements but then crash on the 3rd. The...
Showing results 1 to 8 of 8

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