txt is the conventional filename extension of text files.
Questions tagged [txt]
1467 questions
1
vote
1 answer
Get a specific line before specific line in txt file after comparison
I'm doing comparison between 2 txt files and i want to add before the difference lines the name of interface which contains this line to be like below :.
First file contains :
!CfgFileCrc:f4fcebea
!Software Version V800R021C00SPC100
!Last…

Ahmed Shouaib
- 49
- 3
1
vote
0 answers
How to navigate through XML and return a tag from a multidimensional map that was written to XML
I am currently trying to implement a very simple (primitive) way to read tags from a multidimensional map inserted into an xml file.
I am able to find a word and its line (not line number!) but as soon as I want to navigate through that map and…

Nells
- 21
- 5
1
vote
2 answers
Reading a Matrix from .txt File into A Vector of Vectors With the Size of the Array Declared in the .txt File
For example, I generate a .txt file with the following text, the first number being the number of rows for my array and the second number being the number of columns in the array. I would like to write code that can be used for a matrix of any size,…

Phzyks
- 11
- 3
1
vote
0 answers
Reading text file into jagged array
I'm trying to practice reading text files into a multidimensional object array, and I can't seem to figure out how to do that. The text file I have contains the days of the week, the number of flights for that day and their destinations, and…

PatchPatch
- 11
- 2
1
vote
2 answers
Ansible Deleting AWS Route53 TXT records
I'm trying to delete AWS Route53 TXT records using Ansible
This is a section of my playbook
- name: "Retrieve the details for {{ item }}.{{ build_number }}.{{ internal_domain }} TXT Record"
community.aws.route53:
state: get
private_zone:…

Txynidakis
- 21
- 5
1
vote
2 answers
Quotes generating when pasting values into txt fille
I am using the below code to copy a specific range of data and paste the results into a txt file. However, when pasting additional quotes are being generated on the longer lines that are automatically wrapping to a new line. Is there a way to paste…

arisophia
- 61
- 4
1
vote
1 answer
Open 140GB .txt file in Windows?
I have a huge dna sequence saved in a .txt file of size 140GB that I would like to open using a txt file editor. Notepad, Python, R don't allow to open such a file. Is there a dedicated text file editor to open large files?
I am currently using this…

d.cio
- 62
- 6
1
vote
1 answer
How can I write or change some characters in my file in R?
I have a PRM file that is a kind of text file. I want to change some characters in it. For example, " md = minf; " to "md = maxf;" and "ls = 1" to "ls = 3".
Can you guide me on how can I change it? I don't know how can I use WriteLines function…

Flower
- 39
- 4
1
vote
0 answers
R import txt/csv file with separator inside quotes
I try to import a txt/csv file with R, and here is a simplified example:
txt <- "
id,value
001,'Mary'
002,'Mary's, husband'"
For the second line, I would like to consider the value of the variable value as Mary's, husband delimited with ' and there…

Mary Smith
- 33
- 4
1
vote
1 answer
Password protected zip file wont output correctly?
I am using Python to create a list of groups. It only makes sense to me that, using the code, I have for creating the password protected zip, I can create the input in my code as long as it is created before listing the input. As such, I have…

corianderaquatic
- 13
- 3
1
vote
1 answer
Python cannot open a text file outside of an IDE (Windows 10)
I am having this problem with any python script that involves opening a text file. I have tried in various IDEs, including VSCode and PyCharm, and all works as intended. But as soon as I run the python script for real it closes (due to an error…
1
vote
3 answers
Convert complex txt to csv with python
I want to convert text to csv. Input file contains 10000K lines. Sample of input file is as below:-
Item=a
Price=10
colour=pink
Item=b
Price=20
colour=blue Pattern=checks
My output should look like this
Item Price Colour Pattern
a 10 …
user13706249
1
vote
2 answers
How do i read the first line of integers separated by spaces from a text file in c++?
I am a beginner in c++ coding and i have an assignment for my class. I am trying to read the first line of integers separated by spaces 2 spaces in the file (cannot use arrays or vectors). I have seen many tutorials telling me to use getline () and…

Wyatt d
- 21
- 1
- 3
1
vote
1 answer
R fails to import flat file with unescaped quote inside field
I am trying to import a large .txt file that uses |,| to separate columns. The raw data looks like this:
The original .txt file has 593 118 lines (entries). However, using my import line I can only import 191 838 lines, and a lot of these lines are…

M1ke
- 67
- 8
1
vote
2 answers
How do I send a TXT file in Discord.js?
How do I send a txt file in discord.js as an Attachment?
Like this:
I have tried the following code:
let content = nsOpts.Tcontent
fs.writeFileSync('./nosleep.txt', content)
let atc = new…

Neev Jewalkar
- 45
- 1
- 5