Skip to content

Magenaut

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

sed

Comparing two files using Unix and Awk

August 8, 2022 by Magenaut

I need to compare two files, File1 and File2 (Separated by space) using 4 fields (Field 1, 2, 4 and 5 of File 1 with field1, 2, 4 and 5 of File2).

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

Delete duplicate lines pairwise?

August 8, 2022 by Magenaut

I encountered this use case today. It seems simple at first glance, but fiddling around with sort, uniq, sed and awk revealed that it’s nontrivial.

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

Merging two files, one column at a time

August 8, 2022 by Magenaut

I have 2 large files (3000 columns, 15000 rows) of the following format

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

remove lines that contain a specific text in a file

August 8, 2022 by Magenaut

I have a file with a list of emails in it and each line has an email in it. I want to remove lines that contain the string example.com or test.com.

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

How to add a new text line at the first line of a file?

August 8, 2022 by Magenaut

File: TABLE1 1234 9555 87676 2344 Expected output: Description of the following table: TABLE1 1234 9555 87676 2344 Answers: Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or … Read more

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

How to append text to the end of a certain line of a file?

August 8, 2022 by Magenaut

If I needed to append a username to the end line 32 on a file, how would I do so?

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

How to assign result of sed to variable

August 8, 2022 by Magenaut

Below is a complete copy of a demo I’m using to to figure out to get the sed command to get rid of the spaces in a persons name, and compress it down to not have spaces.

Categories Q&A, Unix & Linux Tags bash, bash-script, environment-variables, sed, shell-script Leave a comment

What does :: do in script of sed

August 8, 2022 by Magenaut

I would like to know what it really does with following scripts used with sed command.

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

How to use sed command to modify a file’s entry line by line in shell script?

August 8, 2022 by Magenaut

This is my file1:

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

Variable in sed

August 8, 2022 by Magenaut

I have a file that contains filenames with absolute path.

Categories Q&A, Unix & Linux Tags filenames, quoting, sed, shell-script Leave a comment
Older posts
Newer posts
← Previous Page1 … Page7 Page8 Page9 … Page11 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