Questions tagged [text-processors]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
202 views

How to hyphenate texts on the command line

I want to split the content of a text file into its syllables (or I simply want to hyphenate it; I don't want to get into the scientifically/lingualistically correct details like here: https://tex....
Torsten's user avatar
  • 143
0 votes
1 answer
62 views

Iteratively find all lines starting with X and move above next line starting with Y

I have a file like this: Lorem ipsum dolor sit amet. Consectetur adipiscing elit. MATCH1 Quis autem vel! Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. MATCH1 Eum iure ...
rahim123's user avatar
  • 103
2 votes
2 answers
2k views

How to find unique lines from each file given 3 text files

I have 3 text files with some unique IDs and I want to keep only unique IDs in each text file. Let's say there are 3 files (A, B and C). If an ID of "abc" appears in A and B, it needs to be removed ...
kee's user avatar
  • 123
0 votes
2 answers
658 views

Parsing inconsistently formatted text data using Excel

I'm having difficulty parsing text from a spreadsheet. I have a spreadsheet with hundreds of records that look similar to the below example (this is all in one cell): 7431340 03 POOLS E TECHNOLOGIES ...
smj7v3's user avatar
  • 1
0 votes
2 answers
64 views

Identifying leading line space - Shell script

I have a sample file like below. There are leading whitespaces. Is there a way to detect them and print the exact line number which contains the whitespace using a shell script? test space at back ...
Daz's user avatar
  • 71
1 vote
2 answers
1k views

How to delete text after 3rd line in multiple files

I'm looking for a way so I can delete lines in text files after a specific line. for example, a file contains 5 lines. I want to delete lines after the third line. see, Line 1 Line 2 Line 3 xxxxxx ...
user3548321's user avatar
0 votes
1 answer
44 views

Using one text file as a modified 'stencil' for other text files with forms

(rephrasing the question for better clarity.) Suppose I have 1000 text files. Each file is a textual form, with fixed field descriptions and headers, but the data is different. For example, file 1: ...
einpoklum's user avatar
  • 9,513
3 votes
2 answers
3k views

Unix tool to output first n characters in an UTF-8 encoded file

I want to print the first 1000 characters in an UTF-8 encoded file. I know that the head tool can print the first n bytes of a file, but it may cut a character in the middle so that I get garbled ...
Wu Yongzheng's user avatar
35 votes
5 answers
32k views

How to replace part of a text file between markers with another text file?

Say I have a text file like this: # custom content section a b ### BEGIN GENERATED CONTENT c d ### END GENERATED CONTENT I'd like to replace the portion between the GENERATED CONTENT tags with the ...
smokris's user avatar
  • 1,602
4 votes
4 answers
23k views

grep file for only part of line

I have a rtf file that I'm using grep on like this grep "Order Number" 'Extract Text Output.rtf' which results in lines that look like this \b\fs28 \cf2 Fab Order Number : FAB00772450\ and I ...
mcgrailm's user avatar
  • 394
0 votes
2 answers
4k views

how to set multiple white spaces (ex: tabs) as delimiters in bash's `cut`

I want to retrieve the cpu usage/free percentage from mpstat output. The bash cut can be used to retrieve such details but i dont know what should be the delimiter viz. [idlecool@archbitch proc]$ ...
Idlecool's user avatar
  • 1,438
14 votes
3 answers
3k views

Text formatter tools

I make notes in textual format, for example: ## TODO list 1. do this 2. do that ## SOMETHING ### ANYTHING 1. do this 2. do that Are there tools to change this text into HTML or LaTeX format? I ...
prosseek's user avatar
  • 5,914
7 votes
4 answers
3k views

Why is so hard to use the dash character?

When typing texts on Word, Notepad or even in Google Docs. I want to use the dash symbol. Note that symbol is used in dialogs. All keyboards simply doesn't have the dash symbol (Alt+0151), so most ...
Click Ok's user avatar
  • 3,865