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

Change First Line Of A File Using Bash

I need to change a single line in a file. It is always in the first line of the file. It looks lik… Read more Change First Line Of A File Using Bash

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

How Can I Print Second And Last Three Lines From Multiple Text Files, In Awk Or Python?

Using awk, I am having difficulty trying to print the second and last three lines from multiple tex… Read more How Can I Print Second And Last Three Lines From Multiple Text Files, In Awk Or Python?

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

Multiple Regex Replacements Based On Lists In Multiple Files

I have a folder with multiple text files inside that I need to process and format using multiple re… Read more Multiple Regex Replacements Based On Lists In Multiple Files