Skip to content

Magenaut

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

sed

How do I prevent sed -i from destroying symlinks?

August 11, 2022 by Magenaut

Why does sed -i executed on symlink destroys that link and replaces it with destination file? How to avoid this?

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

Insert text from file inline after matching pattern in another file

August 11, 2022 by Magenaut

I’m trying to take the contents of a file and insert it after a matching pattern in another file using sed. My question is very similar to this question, but I wish to insert the contents of a file inline rather than on a new line. How can I do this?

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

Decoding URL encoding (percent encoding)

August 11, 2022 by Magenaut

I want to decode URL encoding, is there any built-in tool for doing this or could anyone provide me with a sed code that will do this?

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

When to use grep, less, awk, sed

August 11, 2022 by Magenaut

I’m entering the world of Linux and at work I’m using grep more and more. By doing that I’m figuring out that sometimes it’s not adequate for what I want. I was struggling with grep a few days ago and a colleague of mine who is a senior Linux admin, told me to use awk. … Read more

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

Edit file based on existence of a string

August 10, 2022 by Magenaut

I have an input file, say, file1, which appears as follows:

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

Is there a basic tutorial for grep, awk and sed?

August 10, 2022 by Magenaut

I’ve been a Linux user for a while, and I’ve a pretty decent understanding of most the common command line utilities. However, ones that come up and up again in relation to programming are grep, awk, and sed. About the only thing I’ve used grep for is piping stuff into it to find files in … Read more

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

How to read first and last line from cat output?

August 10, 2022 by Magenaut

I have text file. Task – get first and last line from file after

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

Removal of lines with no more or fewer than ‘N’ fields?

August 10, 2022 by Magenaut

I am working on mac with sed, perl, awk, bash..

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

Replace strings in a file based on a list of strings and a list of corresponding replacements

August 10, 2022 by Magenaut

I am trying to replace strings in a file A:

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

Can sed save its output to a file?

August 10, 2022 by Magenaut

> can do it.

Categories Q&A, Unix & Linux Tags io-redirection, sed Leave a comment
Older posts
Newer posts
← Previous Page1 Page2 Page3 … 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