722 reputation
1413
bio website
location Tampa, FL
age 31
visits member for 2 years, 10 months
seen 2 days ago

Quality Assurance Engineer at Syniverse

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


Aug
13
comment Insert new line after non matching pattern
+1: Though better to add awk -F: 'a!~$1 && NR>1{print x}a=$1' file to prevent the empty first line.
Aug
11
awarded  Vox Populi
Aug
11
awarded  Suffrage
Jun
16
awarded  Constituent
Jun
9
awarded  Caucus
May
29
revised How to keep record of previous operation results in awk?
added 14 characters in body
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