652 reputation
310
bio website
location Tampa, FL
age 31
visits member for 2 years, 6 months
seen 3 hours ago

Quality Assurance Engineer at Syniverse

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


Mar
18
answered How can I delete the first dot before the first number?
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
22
answered Increment numbers inside strings by an offset
Feb
15
answered Print line after nth occurrence of a match
Feb
14
answered Reformat each two-line sequence into two columns
Sep
30
awarded  Yearling
Jul
3
answered How can I print unique line base on particular column value using awk?
Jun
29
comment Need some sed magic: Moving marked lines to the beginning of a file
@manatwork Worked fine with the awk (bsd version) on my mac. But you are right, I tried with gawk v4.1.0 and it didn't work.
Jun
29
answered Need some sed magic: Moving marked lines to the beginning of a file
Jun
26
answered Extract substring using regular expression on a Unix file
Jun
20
comment linux & solaris - separate netmask IP's from ordinary IP's
You can set a variable in BEGIN statement. Check this answer
Jun
19
answered linux & solaris - separate netmask IP's from ordinary IP's
Jun
10
comment AWK - a question about columns
+1 Great solution!