The tag has no usage guidance.

learn more… | top users | synonyms

16
votes
11answers
18k views

Grep huge number of patterns from huge file

I have a file that's growing about 200,000 lines a day, and it is all formed with blocks of three lines as such: 1358726575123 # key Joseph Brunner # name carpenter # job ...
13
votes
3answers
13k views

What is the purpose of -e in sed command?

I can't find any documentation about the sed -e switch, for simple replace, do I need it? e.g. sed 's/foo/bar/' VS sed -e 's/foo/bar/'
11
votes
4answers
644 views

How can I delete all english lines from a textfile?

I have this text file: 714 01:11:22,267 --> 01:11:27,731 Auch wenn noch viele Generationen auf einen Wechsel hoffen, Even if it takes many generations hoping for a change, 715 01:11:27,732 --> ...
16
votes
4answers
7k views

Is there some sort of PDF to text -converter?

I need PDF files to text so I can search over them in bulk from commandline. Is there some converter for Ubuntu, OBSD or similar distro? Perhaps related post, OCR with ubuntu here.
4
votes
4answers
2k views

how to word wrap, align text like the output of man?

what is the command that word wraps and justifies a text file so that the output looks like that of a man page: All of these system calls are used to wait for state changes in a child ...
69
votes
4answers
19k views

Creating diagrams in ASCII

I am looking for a program which I can use to create ASCII diagrams such these: +---------+ | | +--------------+ | NFS |--+ | ...
15
votes
3answers
11k views

Finding all “Non-Binary” files

Is it possible to use the find command to find all the "non-binary" files in a directory? Here's the problem I'm trying to solve. I've received an archive of files from a windows user. This archive ...
8
votes
3answers
2k views

How to convert UTF-8 txt files to all uppercase in bash?

I have some UTF-8 .txt files which I would like to convert to all uppercase. If it was just ASCII, I could use: tr [:lower:] [:upper:] But since I'm working with diacritics and stuff, it doesn't ...
6
votes
2answers
4k views

Keyboard Shortcut To Send Text Strings To Program

How can I configure a shortcut key to send a text string to the current program? The purpose is to type common entries quicker (email address, street address, phone number, username, favorite quote, ...
7
votes
3answers
2k views

Colorized `cat` for source and script files? [duplicate]

Possible Duplicate: How can I display syntax highlighting on a file? Is there any application like cat, but with color output? I'd like to view my files with colors like in any IDE's editor.
3
votes
1answer
3k views

Remove Text from Active Programs in Panel

In the panel, how can I remove the text next to the icons of my active programs? All I want to show is the icon. Specifically, in the example below, I want to get rid of where it says "Disc...", "p2-...
6
votes
1answer
3k views

Converting .docx files to plain text and preserving line breaks to maintain line number references to source document: howto & implications?

I'm exporting MS Word content to plain text for use with text&file utilities. I have a constraint where the line numbering feature has been enabled in the MS software, and any reference to line ...
4
votes
3answers
1k views

How to skip file in sed if it contains regex?

I currently use the following simplified command to remove trailing whitespace and add a newline at end of file where needed: find . -type f -exec sed -i -e 's/[ \t]\+\(\r\?\)$/\1/;$a\' {} \+ As ...
2
votes
1answer
304 views

Continously writing terminal output to text file

I am running a small cli python app in terminal. It loops infinitely and outputs text to the terminal. I want to output the text to a file, and I can do that with the following command python [my cli ...
2
votes
1answer
49 views

Exclude similar values from awk

Kindly consider below files: File 1: boo,194,2322 foo,999,7559 File 2: boo,2322 boo,4526 foo,4222 foo,4223 I need to link Field1 in File 1 with Field1 in File 2 and get the related Field2 ...
1
vote
0answers
46 views

How to extract text out of QuarkXPress file in linux?

Is there a way to extract the text from QuarkXPress? (Preferably, I would not want to use QuarkXPress itself, but free software compatible with it.)
0
votes
0answers
32 views

Tips for parsing proprietary file formats?

So I got a quarkxpress file. The problem is, it confidential, so I can't upload here. In general, given some proprietary file format, what steps can you take to recover data from it in linux? I have ...