The tag has no wiki summary.

learn more… | top users | synonyms

1
vote
1answer
19 views

Using sed to align text starting from pattern to end of line

I have a text like this: LDX LEVEL LDA INITD015,X ; INITIAL ACTIVE SPRITES STA $D015 STA SAVED015 LDA INITXPOS,X ; INITIAL HERO X COORDINATE STA XPOS LDA ...
1
vote
2answers
43 views

Extracting file name and string from multiple files

I have a lot of files (>100,000) from which I would like to extract a specific string and the filename itself. Files are organized like this: Filename: sequence.php?ID=gi|90022703|ref|YP_528530.1| ...
3
votes
1answer
30 views

More shell scripts than one in one text file?

I am learning shell scripting for my introductory UNIX course at my university, and I`m curious if is it possible to have more than one shell script in one text file. What I mean by that is, for ...
3
votes
1answer
24 views

Preventing mid-word line breaks in a2ps

So I understand that a2ps is mostly for converting ASCII code to postscript for printing, but occasionally I like to print a .txt or .md file for school. Often, an entire sentence (or even a ...
0
votes
2answers
56 views

How to copy text from an image in a pdf file?

I can view a pdf image with text using the evince document viewer, however I cannot select the text in the image to copy and paste. How do I copy text from an image in a pdf file?
1
vote
3answers
56 views

cat a directories files apending the file name to the row of text and removing the header row? [closed]

How can I cat a directories files apending the file name to the row of text and removing the header row? So as to only have 1 header row in the all.txt file.
1
vote
1answer
22 views

why does emacs stop superuser from editing files without permissions?

If I have a file I want to edit, as root, I should have the ability to modify it regarless of the permissions. But this does not seem to be the case with all text editors, emacs in particular. If ...
2
votes
1answer
49 views

Copying clipboard-content to file automatically and continiously?

I need to make a list of some links on a web-page. I've been using right-click copy link URL and then pasting it (Menu_Edit->Paste) into vim running in xterm -- then repeating. This is obviously a ...
2
votes
2answers
60 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 ...
1
vote
1answer
37 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 ...
5
votes
1answer
239 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
187 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
93 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.
4
votes
2answers
62 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
42 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
78 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
110 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
434 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
831 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
321 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
73 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 ...
4
votes
1answer
143 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; /* ...
2
votes
1answer
92 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 ...
30
votes
4answers
2k views

Creating diagrams in ASCII

I am looking for a program which I can use to create ASCII diagrams such these: +---------+ | | +--------------+ | NFS |--+ | ...
6
votes
2answers
119 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 ...
3
votes
5answers
183 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 ...
2
votes
4answers
255 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
47 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
2answers
414 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
1answer
173 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...", ...
1
vote
3answers
5k 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 ...
1
vote
2answers
158 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
129 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
972 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 ...
5
votes
2answers
94 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 ...
3
votes
1answer
605 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
801 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
7k 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
385 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
161 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
527 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
835 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
205 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
134 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 ...
0
votes
3answers
367 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
389 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
2k 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 ...
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 ...
1
vote
2answers
96 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 ...
2
votes
2answers
515 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 ...