The tag has no wiki summary.

learn more… | top users | synonyms

1
vote
1answer
648 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 ...
5
votes
4answers
4k 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 ...
1
vote
3answers
3k 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 ...
0
votes
2answers
2k 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]$ ...
10
votes
3answers
2k 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 ...
5
votes
4answers
1k 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 ...