Skip to content

Magenaut

  • Home
  • Topics
    • Notes
    • Tutorial
    • Bug fixing
    • Extension
    • Server
  • Q&A
  • Privacy Policy
  • About

awk

Replace pattern each time with a different string (taken from external file)

August 9, 2022 by Magenaut

I have an input:

Categories Q&A, Unix & Linux Tags awk, perl, sed, text-processing Leave a comment

Is awk’s nextfile specified in POSIX?

August 9, 2022 by Magenaut

GNU awk manual on nextfile reads:

Categories Q&A, Unix & Linux Tags awk, posix Leave a comment

Grep huge number of patterns from huge file

August 9, 2022 by Magenaut

I have a file that’s growing about 200,000 lines a day, and it is all formed with blocks of three lines as such:

Categories Q&A, Unix & Linux Tags awk, database, grep, text Leave a comment

Format data into a table

August 9, 2022 by Magenaut

How can I get the details and transpose it to horizontal form?

Categories Q&A, Unix & Linux Tags awk, perl, text-formatting Leave a comment

How to manipulate a CSV file with sed or awk?

August 9, 2022 by Magenaut

How can I do the following to a CSV file using sed or awk?

Categories Q&A, Unix & Linux Tags awk, csv, sed Leave a comment

How to grep lines between start and end pattern?

August 9, 2022 by Magenaut

I have a file which is having following content: zdk aaa b12 cdn dke kdn Input1: aaa and cdn Output 1: aaa b12 cdn Input 2: zdk and dke Output 2: zdk aaa b12 cdn dke I could use below commands to achieve: grep -a aaa -A2 file # Output 1 grep -a aaa -A4 … Read more

Categories Q&A, Unix & Linux Tags awk, grep, sed, text-processing Leave a comment

convert CSV to XLS file on linux

August 9, 2022 by Magenaut

The following Perl script can convert CSV file to XLS file

Categories Q&A, Unix & Linux Tags awk, bash, linux, perl, shell-script Leave a comment

Replacing missing value blank space with zero

August 9, 2022 by Magenaut

I have input.txt tab-delimited text file around 30K lines, I would like to check each row (s1..s30K lines) for missing value (i.e blank space) and fill the missing value with zero value.See out.txt

Categories Q&A, Unix & Linux Tags awk, perl, sed, text-processing Leave a comment

What’s a good way to filter a text file to remove empty lines?

August 9, 2022 by Magenaut

I have a .csv file (on a mac) that has a bunch of empty lines, e.g.:

Categories Q&A, Unix & Linux Tags awk, sed, shell, text-processing Leave a comment

Insert text in specific lines of a file

August 8, 2022 by Magenaut

How can I insert some text in specific lines of a file? What is the simplest method that I can use? (bash, sed, awk?)

Categories Q&A, Unix & Linux Tags awk, bash, sed, text-processing Leave a comment
Older posts
Newer posts
← Previous Page1 … Page4 Page5 Page6 … Page9 Next →
  1. michealSmith07 on Is there a way to dynamically refresh the less command?August 21, 2022

    That is a very nice post. I like this post.

  2. anonymous on Fix libwacom9 dependency issue when upgrade DebianJune 27, 2022

    saved my day!! Thanks for the help…

  3. sreedhar on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    Thanks its working

  4. saintnick on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    remove libwacom2 worked for me as well

  5. ranafoul on Fix libwacom9 dependency issue when upgrade DebianApril 22, 2022

    apt remove libwacom2 helped on kali 2022.01. gr8

.net ajax asp.net asp.net-core asp.net-mvc asp.net-mvc-3 asp.net-mvc-4 asp.net-web-api bash c# command-line css custom-post-types custom-taxonomy dataframe dictionary django entity-framework functions gridview html iis javascript jquery json linux list matplotlib numpy pandas php plugin-development plugins posts python python-2.7 python-3.x security shell shell-script sql string vb.net webforms wp-query

© 2026 Magenaut • Built with GeneratePress