Skip to content

Magenaut

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

text-processing

What command(s) will feed a tab-delimited text file and cut each line to 80 characters?

August 10, 2022 by Magenaut

I’ve got multiple-line text files of (sometimes) tab-delimited data. I’d like to output the file so I can glance over it – so I’d like to only see the first 80 characters of each line (I designed the text file to put the important stuff first on each line).

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

How to split a file according to a column (including header) and rename the generated files?

August 10, 2022 by Magenaut

I have a .txt that can be exemplified like this:

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

How to read an IP address backwards?

August 10, 2022 by Magenaut

If we have this string (IP address): 192.168.1.1

Categories Q&A, Unix & Linux Tags shell, text-processing 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

How to find/grep what is between string1 and string2?

August 10, 2022 by Magenaut

I am trying to extract a value from a long string that may change over time. So for example the string could look something like this

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

Count distinct values of a field in a file

August 10, 2022 by Magenaut

I have a file with one million lines. Each line has a field called transactionid, which has repetitive values. What I need to do is to count them distinctly. No matter how many times a value is repeated, it should be counted only once.

Categories Q&A, Unix & Linux Tags awk, 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

Where has the trailing newline char gone from my command substitution?

August 10, 2022 by Magenaut

The following code best describes the situation.  Why is the last line not outputting the trailing newline char?  Each line’s output is shown in the comment.  I’m using GNU bash, version 4.1.5

Categories Q&A, Unix & Linux Tags command-line, command-substitution, shell, text-processing Leave a comment

How to merge two files based on the matching of two columns?

August 10, 2022 by Magenaut

I have file1 likes:

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

How to convert TXT to PDF?

August 10, 2022 by Magenaut

I want to convert .txt files to .pdf. I’m using this:

Categories Q&A, Unix & Linux Tags conversion, imagemagick, pdf, text-processing Leave a comment
Older posts
Newer posts
← Previous Page1 … Page3 Page4 Page5 … 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