Skip to content

Magenaut

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

text-processing

Re-number a list when a new entry is inserted

August 8, 2022 by Magenaut

I have a text file of numbered entries:

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

Replace line M in file1 with line N in file2

August 8, 2022 by Magenaut

Let M=3 and N=4. I want to replace line M in file1 with line N in file2. I can replace with a string using sed:

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

intersection of two files according to the first column

August 8, 2022 by Magenaut

I have two files
in file A, there are sequence_numbers
in the other file B, there are many columns, and the first column is sequnce numbers,
I want to get a files with all the lines in the B with the sequence numbers which are in the A
how can I achieve this?
thanks

Categories Q&A, Unix & Linux Tags columns, join, scripting, shell, text-processing Leave a comment

Sum values in 5th column that correspond to same field in 2nd column

August 8, 2022 by Magenaut

Considering below file:

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

How do I trim leading and trailing whitespace from each line of some output?

August 7, 2022 by Magenaut

I would like to remove all leading and trailing spaces and tabs from each line in an output.

Categories Q&A, Unix & Linux Tags pipe, shell-script, text-processing, whitespace Leave a comment

Remove characters if they do not follow specified patterns

August 7, 2022 by Magenaut

I want to clean up some files, and make make the way in which they are written more uniform.

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

Match two words that is on the same line

August 7, 2022 by Magenaut

The command that I have prints out two of the lines whenever FW_6.0.0 is found, below is the code:

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

Delete the nth line from a matched string (which only occurs once in the file)

August 7, 2022 by Magenaut

I have a question related to deletion of strings that appear at the n+2 position after the matched string which is at position n using awk for multiple files. I am able to print it using the command:

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

Print range of columns comma-separated, and the rest without comma-separation

August 7, 2022 by Magenaut

I’m trying to figure this out.

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

Find records present in file 1 also in both file 2 and file 3

August 7, 2022 by Magenaut

I have three files file1.txt, file2.txt, file3.txt and they are of same format.

Categories Q&A, Unix & Linux Tags awk, columns, shell-script, text-processing Leave a comment
Older posts
Newer posts
← Previous Page1 … Page10 Page11 Page12 … Page15 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