txt is the conventional filename extension of text files.
Questions tagged [txt]
1467 questions
8
votes
3 answers
AWK to search a specific sequence and if found search in the next line another sequence
I'm trying to find a string in a txt format and each time it's found then look for an specific string to change for another string and avoiding reading the first sequence of the line.
Imagine the nexts hexadecimal txt:
0000 09 06 07 04 00 00 01 00…

Max
- 327
- 1
- 7
4
votes
0 answers
Google Admob is not finding my App-ads.txt. How do I change this within a web-builder?
Google only allows me to post on their community forum for contact support. This has resulted in 0 responses over 2 weeks.
Here is the problem:
Google Admob is not finding my app-ads.txt
I suspect this is because the app-ads.txt is written in text…

Yash Jain
- 41
- 1
4
votes
3 answers
How can i convert a .txt document into an array in JavaScript?
I am trying to convert a .txt deocument into an array.
The document has names in it and is structured like this:
Name1
Name2
Name3
The program has to read the lines and the output should be
["Name1","Name2","Name3"].
I have looked all over the…

PhDaher
- 41
- 1
- 2
3
votes
0 answers
Stylometry with R-Studio: Error with command oppose from package "stylo" - why is my corpus not usable?
I run a stylometric analysis of poetry in R Studio using the package "stylo". I want to compare two sets of texts via function oppose. I created subdirectories in my working directory for the partitions "male" and "female.
# create folders for the…

xusha666
- 31
- 3
3
votes
1 answer
Different header and footer FileHelpers
I am using the FileHelpers library to create a txt document which contains a list of employees, the document needs to be created with fixed size fields, I need to add a header and footer with a different structure than the body, for example in the…

Andrés
- 43
- 5
3
votes
4 answers
Iterate two lines at a time over text file, while incrementing one line at a time in python
So let's say I have a text file, which contains this:
a
b
c
d
e
I want to iterate through every line of this file, but in the process also get the line following the first line. I have tried this:
with open(txt_file, "r") as f:
for line1, line2…

hongdekong
- 41
- 2
3
votes
1 answer
Using python to separate a long text file into multiple files based on hyphen line separators?
Working to separate a single long text file into multiple files. Each section that needs to be placed into its own file, is separated by hyphen lines that look something like:
This is section of some sample text
that says something.
…

DataMiner_NLP
- 121
- 5
3
votes
3 answers
R how to pivot a table (with two columns) with categories of different length?
I have a table, shown as below. I need to pivot it so that data is spread horizontally and store it in a txt file with sep = space. But since the number of items per category differs, I am not sure what data structure is the best to use.
I have been…

RBG
- 39
- 2
3
votes
2 answers
How to save python result as excel xlsx
This code below read .txt files and print the results, but I need save the results as .xlsx, I searched the internet but I didn't get any solution, can someone help me?
import os
path = input('Enter Directory:')
os.chdir(path)
def…

Gustavo Silva dos Santos
- 31
- 1
- 4
3
votes
3 answers
Most efficient way to convert large .txt files (size >30GB) .txt into .csv after pre-processing using Python
I have data in a .txt file that looks like this (let's name it "myfile.txt"):
28807644'~'0'~'Maun FCU'~'US#@#@#28855353'~'0'~'WNB Holdings LLC'~'US#@#@#29212330'~'0'~'Idaho First Bank'~'US#@#@#29278777'~'0'~'Republic Bank of…

Aquiles Páez
- 503
- 6
- 18
3
votes
2 answers
I don't know how to use filesystem to look for .txt files c++
I would like to use std::filesystem in my project, which will allow me to show .txt files in the current directory (I use Ubuntu, I don't need a Windows function because I have already seen one on StackOverflow).
Here is my GitHub…

Eriss69
- 69
- 5
3
votes
1 answer
why is powershell not printing txts with line breaks?
so i am trying to display commands for a powershell script for self-use. i am using a txt file as the source of the list. the txt file is formatted as so;
command (* is input)| description
----------------------------------------------------
pack …

1ctinus
- 55
- 1
- 7
3
votes
3 answers
How to Delete First Few Rows of .txt File in Python?
I have a .txt file which looks like:
# Explanatory text
# Explanatory text
# ID_1 ID_2
10310 34426
104510 4582343
1032410 5424233
12410 957422
In the file, the two IDs on the same row are separated with tabs and the tab character is encoded as…
user14473192
2
votes
3 answers
I need to remove white spacing for lines that are separated by white spacing, in a .txt file, from Ubuntu
enter image description here
Hello!!
As it says in the title, I need to remove the white spacing that separate only by a white spacing to two lines, as you see in the image, the white spacing that have a green line, are the ones I need to remove,…

jdedsec
- 23
- 2
2
votes
1 answer
Reading data from text files containing data in the form of a table
Please tell me if there is at least some working way using Python or JS to get data from a text file containing data in the format shown below.
table.txt =
ANNUAL
Five fiscal years ended September 30, 1994
1994 …

Jerom Ganoć
- 21
- 3