717 reputation
1411
bio website
location Tampa, FL
age 31
visits member for 2 years, 10 months
seen Jul 25 at 23:03

Quality Assurance Engineer at Syniverse

Trying to improve awk and bash skills. Learning perl and python for automation.


Jun
16
awarded  Constituent
Jun
9
awarded  Caucus
May
29
comment How to keep record of previous operation results in awk?
@bourne Great, I'm glad I could help out.
May
29
comment How to keep record of previous operation results in awk?
@bourne No problem, I made one small change. I was adding a leading - in the last column. Have fixed the solution to remove that. Hope this works out for you.
May
29
revised How to keep record of previous operation results in awk?
added 14 characters in body
May
29
comment How to keep record of previous operation results in awk?
@bourne match functions grabs the first match it finds. After seeing your real data, I don't think you even need to use it. Check my updated answer that uses your real data as input.
May
29
revised How to keep record of previous operation results in awk?
added 862 characters in body
May
28
revised How to keep record of previous operation results in awk?
deleted 6 characters in body
May
28
answered How to keep record of previous operation results in awk?
May
9
awarded  Famous Question
Apr
18
comment I'm trying to count and print song file names using awk as following
FNR==1{next}{a[$5]+=1} can be written in a more awkish way as NR>1{a[$5]+=1}.
Mar
16
comment grep change of line followed by a variable
grep --no-group-separator -A1 '!' inputFile | grep -v '!' would be better.
Mar
16
comment grep change of line followed by a variable
Thanks @devnull. Yea, I was pretty much certain what I had in earlier was what OP wanted until a new answer came in which completely threw my understanding of the question. So went with both! :)
Mar
16
revised grep change of line followed by a variable
added 294 characters in body
Mar
16
answered grep change of line followed by a variable
Mar
14
answered awk remove the rows based on another column value
Mar
14
answered Merging Two Files columns in order
Mar
11
answered Printing specific section of a line when a trigger value is present
Mar
11
comment How to multiply a data file with another index data file?
+1: You can shorten it by doing awk 'FNR==NR{a[FNR]=$0;next}{for(i=1;i<=NF;i++)$i=$i*a[FNR]}1' OFS='\t' index.txt data.txt
Feb
15
answered Print line after nth occurrence of a match