Skip to content Skip to sidebar Skip to footer
Showing posts with the label Awk

Multi-line Search And Replace

I have an unstructured file and I would like to search and replace pattern of strings. Must repla… Read more Multi-line Search And Replace

Combine Lines With Matching Keys

I have a text file with the following structure ID,operator,a,b,c,d,true WCBP12236,J1,75.7,80.6,65.… Read more Combine Lines With Matching Keys

Removing Duplicated Lines From A Txt File

I am processing large text files (~20MB) containing data delimited by line. Most data entries are d… Read more Removing Duplicated Lines From A Txt File

Sort A Field In Ascending Order And Delete The First And Last Number

I have a data that looks like following: a 10,5,3,66,50 b 2,10,1,88,5,8,9 c 4,60,10,39,… Read more Sort A Field In Ascending Order And Delete The First And Last Number

Python: Consecutive Lines Between Matches Similar To Awk

Given: A multiline string string (already read from a file file) Two patterns pattern1 and pattern… Read more Python: Consecutive Lines Between Matches Similar To Awk

Python Remove Phone Numbers From String

I have a text file that looks like this: rgf34 | 9 | 2015-07-20 | hello this is my number 123456789… Read more Python Remove Phone Numbers From String