text intended for human readers, generally consisting of sentences in a human language organized in paragraphs

learn more… | top users | synonyms

6
votes
3answers
487 views

Grep word within a file then copy the file

I have a collection of files ( *.zip, *.txt, *.tar.gz, *.doc, ...etc ). These files reside within a path. I want to find all the files ( *.txt), then copy, only, the text files that contain specific ...
3
votes
2answers
29 views

Problem with reading text file encoded in Western encoding (ISO-8859-1)

I'm having a problem with encoding of ISO-8859-1 text file (subtitles in Polish language), which looks something like that: Mieszka³ sam,|¿adnej ¿ony, dzieci. It should be : "Mieszkał sam, żadnej ...
0
votes
3answers
63 views

How to configure 'at' and 'sendmail' to mail output with Content-Type: text/html

I am upgrading some batch programs to produce html output rather than text. The batch programs are run with the at command, which in turn sends all output to the user using the sendmail command. ...
0
votes
1answer
47 views

“Print” text file to images with layout from command line

I have long journal files that I would like to view as images. I don't want to have to screencap my text editor. I am using LibreOffice to Export them to jpg, but I have to do everything ONE. STEP. AT....
1
vote
1answer
30 views

Watch/View file contents but no new lines added

This post 'Output file contents while they change' is similar but the answer doesn't work for my case. Tail -f doesn't seem to refresh the output when the file's size doesn't change or when there are ...
0
votes
1answer
48 views

copy lines of text between two files using string matches

Looking for some help, I have two files, one is a large list of various names the other is coordinates. both files start each line with an 8 digit code. I want to lookup 8 digit line code from File1 ...
0
votes
1answer
23 views

Retrieve text from a large file using a smaller matching header

I need to extract the text between two headers, if the first one matches with a source file for lookup the headers to search, example: &Header1 ...
3
votes
1answer
43 views

Splitting a large file by column with values in the header as file names

I have a large tab-delimited text file which contains a header and data. I want to split the file into smaller files by column, with the header excluded, and the files named as the column name. pos ...
0
votes
1answer
6 views

command line, how to search a pattern in the first line and delete them

I want to delete something not useful in the first line like following: 1-TagDir (cs) 2-TagDir (a) 3-TagDir (cd) 4-TagDir (abc) Output: 1 2 3 4 How should I do?...
27
votes
8answers
3k views

Is there a convenient way to classify files as “binary” or “text”?

Standard Unix utilities like grep and diff use some heuristic to classify files as "text" or "binary". (E.g. grep's output may include lines like Binary file frobozz matches.) Is there a convenient ...
1
vote
1answer
50 views

file command output for a non-ASCII text file in AIX and Linux [closed]

I am getting different output while using file command in AIX vs Linux. File contents : D|P_APAC_PH_PHINGTF00240_20150731031225|APAC|PH|NN (L) SPEK DYWIDENDOWYCH RYNKÓW WSCHODZCYCH||4|20130308|PHN|...
0
votes
1answer
52 views

Unix, create file based on command [duplicate]

I have a command, but I want to get the results into a .txt file I can open. How do I alter my command to allow the results to be put into a text file. I plan to transfer this .txt file to my local ...
3
votes
1answer
779 views

How to number paragraphs

I know I have already asked this question, but I didn't get an answer that worked. So please could someone answer my question? I have a text file, containing paragraphs of text, each separated by a ...
27
votes
4answers
2k views

Does vi silently add a newline (LF) at the end of file?

I have trouble understanding a weird behavior: vi seems to add a newline (ASCII: LF, as it is a Unix (AIX) system) at the end of the file, when I did NOT specifically type it. I edit the file as such ...
1
vote
2answers
357 views

Debian - How to change Terminal background colors

I am a Git Bash user who is now switching to Debian. Here was my Git Bash's look: Here is my look on Debian: My .bashrc file is completely EMPTY. I have nothing in there currently. I've been ...
0
votes
0answers
19 views

Script acting as textfile, possible? [duplicate]

A program I'm running has a -logFile option. The file I set as a logfile is filling up quite rapidly, and I only need about half of what's actually in it. Is it at all possible to: have a script (...
1
vote
0answers
44 views

Read and write line from .txt, in CSH script [closed]

well I have to do a basic script,is mandatory in csh, and I decided to do a simple "task manager". Based on a .txt file, the user can add task, show tasks, delete X task. The problem I don't manage to ...
0
votes
0answers
34 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 ...
2
votes
0answers
42 views

Command like `column -t` but encoding-type agnostic? [closed]

Essentially, I am looking for an encoding-type agnostic version of the column -t command in linux. I need to convert delimited files to flat and then write to an outfile. The specific delimiter ...
6
votes
1answer
72 views

How can I make `file` output line break type and encoding for all file types?

I often find myself in the need to check the encoding and the line break type of a file. The file utility seems to be a perfect fit. Unfortunately it doesn't output the desired information for all ...
1
vote
0answers
50 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
2answers
109 views

Check whether a file uses CRLF or LF to end lines [duplicate]

How to check whether lines in a text file end with CRLF or LF?
1
vote
3answers
60 views

How to extract “foo” from “foo-bar-baz” in bash? [duplicate]

I'm trying to extract foo from the string "foo-bar-baz" in bash. Any ideas how to do it using string substitution or something similar (without external tools). I tried this but it didn't work: $ ...
3
votes
4answers
172 views

How do I create a text file (1 gigabyte) containg random characters with UTF-8 character encoding?

The following command does not use UTF-8: head -c 1M </dev/urandom >myfile.txt
3
votes
1answer
278 views

Extract specific columns from text file

There is a text file, with aboot 10000+ lines, in the format: field1 field2 field3 field4 field5 ... fieldX It needs to be converted to look like: field1,field2,field4,field3,field5 to fieldX The ...
1
vote
1answer
208 views

save output of a python script to a text file

how can i save output of this python script to a text file? this is a KMS server which clients connect to it and activates their windows or office. i wanted to save the log in a text file. I should ...
2
votes
1answer
50 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 ...
0
votes
3answers
67 views

Search for number in text [closed]

I have a text file and I want so scan this text file for a specific number. Lets say the text file is: asdg32dasdgdsa dsagdssa11 adad 12345 dsaga Now I want to search for a number with the length ...
1
vote
0answers
119 views

How can I recieve SMS texts with the mail command? [closed]

I have figured out how to send sms messages with mail; the same way I would with regular email, by sending my message to phonenumber@SMSgate. This works great. I've also entered "linux" in /etc/...
0
votes
0answers
47 views

CentOS 7 VM small text issue at High Resolution

I recently created a CentOS 7 VM in order to prepare for the RHCSA 7 exam (since they are both based on Fedora and are quite similar, I decided to opt for CentOS 7 as it is free, and RHEL isn't). In ...
0
votes
1answer
59 views

Default text file permissions?

How do I find out the default permissions for a newly created text file? I've tried ls -l filename.txt but it keeps saying it cannot access the txt file, so im pretty sure I'm doing it wrong ...
1
vote
2answers
221 views

What's the best way display tabs/spaces in my plain text files

I have a file that unfortunately contains both tabs and spaces. How do I display them so I know if a particular space is actually tab or space?
0
votes
0answers
25 views

In sed, what's the best way to apply blocks of commands to multiple addresses?

If I have a block of sed commands I want to apply to multiple addresses that aren't an address range, what is the best way to do this without repeating the block separately for each address? The only ...
0
votes
1answer
41 views

Can you replace displayed text with something else in command window?

I am trying to manage user accounts. They are basically just numbers, but I would rather see user last names on the screen. Is it possible to automatically replace displayed text with something else? ...
3
votes
0answers
11 views

With EN/HE layout, why do the arrow keys switch from logical to visual with Ctrl down?

I type in both Hebrew and English. When I use the Windows Manager's dialogs, or a GUI text editor such as leafpad, and type Hebrew text, I find the horizontal arrow keys (LeftArrow and RightArrow) ...
2
votes
3answers
189 views

uniq showing duplicate lines

$ grep home american.txt | sort | uniq A home and a country should leave us no more! ...
0
votes
0answers
39 views

What's wrong with this conky config? It's dog slow and doesn't display most of the text

It looks fine other than that it runs very slowly and I don't get any text beyond the 9th line or so. Window is the right size. I've got this feeling like Conky is the wrong tool for this. For the ...
1
vote
0answers
46 views

Print pdf like paps, but with actual fonts?

So I convert a piece of text to PDF like so: INPUT="this text goes to a pdf file" paps $INPUT 2>/dev/null | ps2pdf -sPAPERSIZE=a4 -dOptimize=true -dEmbedAllFonts=true - out.pdf Which works great,...
0
votes
0answers
15 views

sorting files using header information [duplicate]

I have multiple image files inside a directory having the same extension (.mrc). In the terminal, if I do, header , it gives following output: RO image file on unit 1 : ...
0
votes
0answers
33 views

Polish–Vietnamese mojibake in a .txt file, using LibreOffice, mousepad, and vim

I have a trouble with some .txt file. When I try open it with mousepad, vim or LibreOffice Writer in every case some Polish letters are changing to another, incorrectly (i.e. correct char ś and ć are ...
0
votes
3answers
102 views

Make curl/cat not scroll down when given long text?

I have made a program where I read the text from a url using curl. The problem is that when given texts that are larger than the terminal window, it automatically scrolls down to the bottom, I want to ...
0
votes
1answer
347 views

How can I find and replace only in a range of columns?

I have a text file with 9267 lines. I want to find "A" with 5 spaces after it and replace it with "A" with 5 spaces before and after it on all lines, but only between columns 67 and 88. Text outside ...
2
votes
1answer
327 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
5answers
329 views

Duplicate lines and make them unique?

I have the following structure of text lines: 3923 001 L05 LV,L05 RM 3923 002 L12 RA,L12 LA 3923 003 I06 ALL 3923 004 G04 RV,Z09 ALL but i would need this: 3923 001 L05 LV 3923 001 ...
0
votes
1answer
213 views

ArchLinux i3 font rendering issue on Chromium

The font on Chromium's menu items is off-centered as seen below: Only chromium has this issue (I've tested LibreOffice). The font used to be fine, but I believe I made a change somewhere that ...
4
votes
1answer
139 views

Gedit displays text, but cat tells a different story

I am trying to sort a dictionary from Grady Ward's Moby and have encountered a bit of a problem. When I open it in gedit, I get: abaca×N abaciscus×N abacist×N aback×v abacli×p Abaco×N abactinal×A ...
0
votes
0answers
47 views

Searching text data in Hebrew, Arabic or Aramaic

How can I search for a (sub-)string in a database that has several languages, including Hebrew? I am assuming that the text being right-to-left is a question of the presentation, but the logical (...
2
votes
2answers
901 views

add filename as text in the corner of an image file

I have a bunch of jpeg images. Say 001abcd.jpg, 002abcd.jpg, and so on. I want to capture the filename and add it as a text in the image itself in one corner. So the result would be, for example, the ...
0
votes
2answers
348 views

Print text between two patterns not containing a particular word

I wanted to print some text between two patterns which doesn't contain a particular word input text is HEADER asdf asd asd COW assd TAIL sdfsdfs HEADER asdf asd sdfsd DOG sdfsdfsdf TAIL sdfsdfs ...
0
votes
2answers
77 views

compare two files and fetch data

I have two files: File A sample >> AT5G46880.1|PACid:19669936 # score bias c-Evalue i-Evalue hmmfrom hmm to alifrom ali to envfrom env to acc --- ------ ----- --------- -...