The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
3answers
285 views

Text editor with indented word wrapping

I've been using Notepad++ in windows for a while and it has a cool feature for word wrapping so that the wrapped text is indented. That is the start of the sentence starts at column 1, but wrapped ...
1
vote
1answer
28 views

Command line utility for reading tabular data

I am looking for a command line utility that would allow me to quickly investigate structure of a large dataset. Right now I am doing it by using: head -n 2 dataset but the problem is that the width ...
1
vote
2answers
30 views

Format output to a specific line length

So I have some output that has very long lines, and I want to have it formatted to lines no more than 80 columns wide, but I don't want to split words because they are in the column limit. I tried ...
30
votes
4answers
1k views

Creating diagrams in ASCII

I am looking for a program which I can use to create ASCII diagrams such these: +---------+ | | +--------------+ | NFS |--+ | ...
4
votes
1answer
106 views

Right-align comments in vim

I'm writing C code using vim and are searching for a possibility to right-align my comments so that they all end at col 80. To give a short example: int a = 80; /* initialize a */ int b = 7; /* ...
1
vote
0answers
25 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 ...
5
votes
1answer
140 views

Cannot cat or grep contents of file

I'm on Debian Jessie. When I open a new textfile with mousepad and save it, then modify it with vim and save it again, I cannot print or grep the contents of it anymore. If I do cat file, nothing is ...
1
vote
2answers
65 views

Possible to view two text files side by side (read only)?

In emacs, we can view two text files side by side. Is it also possible to do so in some simpler/lighter applications such as less? Only viewing, no editing.
5
votes
1answer
72 views

Copy a long single-line text from a terminal with undesired change-line

locate ... | less outputs a long path, which is shown as several lines in the terminal, although it is actually a single line. I copy the path from the terminal by selecting the text with mouse and ...
4
votes
2answers
56 views

Verify line endings from a text created by perl script

I am interested in seeing the contents of a text file in hex mode. I have tried :%!xxd and the problem is that I can not really understand which hex code represents each letter e.g. when you use an ...
1
vote
1answer
24 views

How to echo from specific line of a file to another specific line [duplicate]

Assume I have a file with about 10000 lines. How can I print 100 lines, starting from line 1200 to line 1300?
1
vote
2answers
57 views

Using source downloaded on windows on Linux platform

I downloaded the Linux source code from the git repository on Windows and then copied the files to Fedora. I am unable to the build the kernel. Is this, because I downloaded the source on Windows ...
0
votes
4answers
55 views

grep to see if a line ends with a particular string

Hello I have a file that has a lot of lines that end with main.css">, and some of them are repeated. I want to keep only one copy of these lines and delete the repeated line. Could I use grep to ...
9
votes
2answers
316 views

Filter output of command by color

I am running a utility that doesn't offer a way to filter its output. Nothing in the text of the output indicates that a particular function failed but it does show in red. The output is so long that ...
8
votes
2answers
782 views

What is the ^M character called?

TexPad is creating it. I know that it is under some deadkey. I just cannot remember it is name. The blue character: I just want to mass remove them from my document. How can you type it?
4
votes
6answers
239 views

Extract lines based on words on position, not column

I have a file like this: v ATOM 57 O LYS A 7 2.254 25.484 18.942 1.00 14.46 ATOM 77 NH1AARG A 8 5.557 19.204 13.388 0.55 24.50 TER 1648 ...
2
votes
2answers
33 views

Is there an auto refreshing graphical text file reader?

So, is there a graphical text reader or editor that automatically refreshes its text if the file is completely changed outside of it? I found that gedit detects file changes but refresh is not ...
2
votes
1answer
42 views

md5sum command binary and text mode

The GNU md5sum command has two modes: binary mode and text mode. I guess the difference is only on how newline characters are handled? Am I right? On GNU/Linux, the two modes always produce same ...
3
votes
5answers
152 views

How to prepend a particular text file contents to every text file in a directory and its subdirectories?

I hate to clutter my source code files with licensing/attribution comments but some times it is a requirement. So having dozens of source code files (organized in a tree of subdirectories) written I ...
1
vote
3answers
3k views

How to change encoding from Non-ISO extended-ASCII text, with CRLF line terminators to UTF-8?

I have a txt file : $ file -i x.txt x.txt: text/plain; charset=unknown-8bit $ file x.txt x.txt: Non-ISO extended-ASCII text, with CRLF line terminators And there are some characters that are ...
2
votes
4answers
237 views

How to multiply a data file with another index data file?

I want your help in multiplying my data file with another index data file. Both data files have the same number of rows. But the data file have more than 1000 columns while the index data has only one ...
0
votes
1answer
38 views

text replacing in data file with peculiar spacing

I have a text (.qdp) file with many data stored. In some rows, the data are too many to be on just one line. Then, the program that saves the data, use a minus sign (-) to go on the new line, and ...
4
votes
3answers
494 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 ...
4
votes
2answers
276 views

How to know if a text file is a subset of another

I am trying to find a way to predict if a text file is a subset of another.. For example: foo bar is a subset of foo bar pluto While: foo pluto and foo bar are not one a subset of each ...
1
vote
0answers
78 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...", ...
6
votes
3answers
494 views

How to replace all percent-encoded UTF-8 substrings with plain UTF-8 text?

I've got a html file with a lot of %-encoded UTF-8 text in URLs. For example "%D1%80%D0%B5%D1%81%D1%83%D1%80%D1%81%D1%8B" stands for "ресурсы" ("resources" in Russian). The task is to replace all ...
2
votes
2answers
448 views

view file containing ISO-8859 text, CRLF line terminators, and escape sequences

I have stumbled upon a strange text file in an archive of an old dos game downloaded from some abandonware site. The text file is named WHY_NOT.TXT. I assume the file is some sort of .NFO file from ...
1
vote
2answers
123 views

How to bury an invisible mark into lines of text?

How can I bury an invisible mark into random lines of text? Such a mark has to be there, though it will be invisible to someone reading that text printed out on the console. I want to identify those ...
3
votes
1answer
100 views

Read the files in shell script doesn't print out anything?

I am trying to read a file from shell script line by line. Below is my file content - hello=world And below is my shell script that I have written - #!/bin/bash while read -r line; do ...
1
vote
3answers
526 views

Open a text file in a terminal and auto-refresh it whenever it is changed

How do I open a text file in a terminal with instant auto-refresh every time it is changed? I've looked at vim with :set autoread, but it requires some elementary input (such as a keypress inside ...
3
votes
2answers
78 views

Get “Text Content” of Files

I was wondering if there is a tool to scrape text content of a file. Basically I would like to put in a pdf, word document, compressed file or anything else and get the text it contains out. There ...
2
votes
3answers
570 views

How can I turn ugly output into pretty, useful information?

How can I turn this ugly output into pretty, useful data? The output: /* ---------- TA#box#AbC_p ---------- */ insert_job: TA#box#AbC_p job_type: a #owner: bob permission: gx date_conditions: 1 ...
4
votes
5answers
1k views

extract fields from “tail -f” of a syslog stream

Example line from syslog file: Aug 1 10:25:50 10.10.10.1 id=firewall sn=XXXX time="2012-08-01 14:35:18 UTC" fw=x.x.x.x pri=6 c=1024 m=537 msg="Connection Closed" f=11 n=195273698 ...
3
votes
1answer
421 views

Is there something like a lorem ipsum generator?

Is there something like a 'lorem ipsum generator'? I know it exists in Latex, and even in LibreOffice, but I'm looking for a terminal command. I would like to type something like loremipsum 10 ...
2
votes
1answer
513 views

Search and Filter Text on large log files

I use the tail, head and grep commands to search log files. Most of the time the combination of these 3 commands, in addition to using pipe, gets the job done. However, I have this one log that many ...
1
vote
2answers
5k views

How to select, copy and paste some columns from different files and create one file from them?

I want to create and organize data in a file from a number of files by selecting parts of the columns of the given files. I have more than 10 file to copy the second, third and forth columns of each ...
11
votes
4answers
368 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 --> ...
3
votes
3answers
148 views

Transforming text to tabular form

I have a text file with the following structure: aaa bbb ccc ddd eee fff 1 2 3 4 5 6 1.1 1.2 1.3 1.4 1.5 1.6 ggg hhh iii jjj kkk lll 7 8 9 10 11 12 2.1 2.2 2.3 2.4 2.5 2.6 and I want the ...
1
vote
1answer
338 views

Carriage Return and Line Feed bit streams in a binary file during TFTP upload in ASCII mode

In case of TFTP, one can choose between "ASCII" or "octet" mode. As I have understood, 00001010(new-line) or 00001101(carriage return) bit streams in a binary file will get some sort of special ...
5
votes
2answers
632 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 ...
3
votes
1answer
162 views

Is the last new line on fstab important?

What happens if the last line of fstab is not terminated by a newline? Why do people get a warning when that last line is not terminated by a newline?
4
votes
1answer
121 views

Is there a Unix command that searches for similar strings, based mostly on how they sound when spoken?

I have a file of names, and I want to search within it, not caring too much about whether I have spelled the name ( that I am searching for ) correctly. I know that grep has quite a bit of ...
1
vote
2answers
95 views

Reduce redundant logfile

I often have longer redundant log files, redundant in the sense that blocks of text repeat with minor changes. The length of the files makes it difficult to spot the actual information. I had the idea ...
5
votes
4answers
610 views

Look for English word in a file via terminal

How to find and print out English words contained in a file via linux command line?
1
vote
1answer
272 views

Selecting/highlighting Text Problem

I am using Backtrack 5. As it is based on Ubuntu 10.04 I decided to ask my question to here: I'm having problems selecting text with my mouse. For example when I try to rename a folder, sometimes I ...
6
votes
5answers
1k views

Script to remove spaces and lowercase in file names

I am trying to write a script that will replace spaces with "-" and make all letters lower case for all files in the current directory. for x in 'ls' do if [ ! -f $x ]; then ...
2
votes
1answer
920 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, ...
4
votes
2answers
1k views

Character count in Unix wc command

When I give wc command on a file with contents given below, it gives the number of characters as 30. Does it include the end of file character? Since including the space and newline there are only 29 ...
5
votes
1answer
175 views

Synonyms (from a thesaurus) in Emacs

I use Emacs 23 on Debian sid. I can check the spelling of a word in Emacs with M-$. How can I obtain synonyms (using a thesaurus?) for a word in Emacs? None of the following were useful: one, two, ...
2
votes
1answer
267 views

Compare all text files in a directory, and sort by similarity

In Unix, is there any way to compare every text file in a directory to every other text file in the directory, and then sort each pair of files by similarity (using the diff utility)? There are ...