Questions tagged [txt]

txt is the conventional filename extension of text files.

1467 questions
-2
votes
1 answer

grep output show result with file name but not full path

I use grep (egrep) to search text a log. I have multiple txt files to search in the same folder. By default, grep output file name (full path), with math result. The directory path is long so it looks ugly. However, if I use -h option, it only give…
Lenny
  • 29
  • 1
  • 9
-2
votes
3 answers

How to assign variable for every line in txt seperately in Python?

I have a text file that with multiple lines and I'm trying to assign turn every line into a string and assign them into a variable separately. The code looks something like this at the moment: with open('config.txt', 'r') as f: file_name =…
jxaiye
  • 13
  • 4
-2
votes
1 answer

GitHub raw text file content is used to login in Python

So I have this little problem that i wanted to make a little script that gets the website content text from a raw .txt file in GitHub. Everything works fine it gets the 4-digit login code and prints it, but when i ask for it on input it just doesnt…
MrQuacki
  • 11
  • 3
-2
votes
1 answer

Making a txt file using excel sheet data

excel image file txt image file I am a biology student and have no experience in coding. I want to make txt files from specific data from excel files. The data in the txt file should be in the format given in the txt file where center_x = data from…
-2
votes
3 answers

Create csv file using python, where all the values are seperated after first spacing and creates one column

I need help to convert simple_line.txt file to csv file using the pandas library. However, I am unable to categorize image file where i want to create all the values after first space in one column. Here is the file (sample_list.txt), listed row by…
-2
votes
2 answers

Delete every fourth line in a .txt file in Python

I have a .txt file in which I have multiple lines of code which looks like this:- [03-Jun-22 06:32 AM] flylineman#0052 9fSQR7M1aS95wtmDpsRTvzKJzbP49dngMVn58rG2Usxo [03-Jun-22 06:32 AM]…
Khushhal
  • 51
  • 8
-2
votes
1 answer

Incorrect reading of an array

I am working in c-sharp .net and I am working on creating a login screen for my project. I have a text file with login info for all the users. My c-sharp scrip reads that file to a string then cuts it up into two lists, _usernames and _passwords.…
user18339230
-2
votes
1 answer

how to replace characters in a string (from text format to array)

I have a text document with questions and answers, there are 10,000 of them, for an example I will add a few below ' Severe cold | cold A heavy massive vessel in which they pound with a pestle.|stupa Monumental religious building in Indian…
Eduard
  • 27
  • 5
-2
votes
1 answer

How to encode and decode a text file to binary in c#?

For my Unity Game, I want to save player data by using text files. Text files can be easily modified and so can the data in them be modified. So, I would like to convert the text files to 0's and 1's. So that when you open it you should see 0101011…
Harsh
  • 17
  • 1
  • 6
-2
votes
1 answer

Another way to parse txt files in Java?

Is there exists some another way to parse .txt file in Java except BufferedReader reader = new BufferedReader(...); String line; while ((line = reader.readLine()) != null) {...} ? I need to parse this file moving by 2 rows. Is there any way to…
-2
votes
1 answer

The results of python's work should be written to a text file, python 3

I have a problem and I don't know how to solve it. There is a code in which I get the result of the found registry (its output) to the terminal. But, I need to write it to a file right away, and not write a command at startup. How can this be…
-2
votes
1 answer

NetBeans 12.6 not opening txt files on MAC

I am trying to open a txt file in NetBeans 12.6 using Java. I placed the txt file in the main project file. When I try to open the file using the File and Scanner method I keep getting the "Unreported exception FileNotFoundException" error. Is there…
K_Cole369
  • 1
  • 1
-2
votes
4 answers

How to convert text file column into csv file single row using pandas?

I have text file which look like this: textfile now I want to convert that text file in csv file single row The outcome would look like: csv_output
zsyfrkn
  • 27
  • 3
-2
votes
1 answer

Delete multiple data from several CSV files in one click

I have more than 500 csv files with identical format - 6 columns (count,height,link,title,titles,width) and with multiple lines. I would like to keep only the "link" column (with all urls) from these >500 csv files. At the end, I would like to…
bigbox
  • 17
  • 5
-2
votes
1 answer

C - Read input from text file (int,string,int,int)

First of all sorry for any english error. So, I have this data in a .txt file Codigo,Produto,StockMinimo,StockAtual 1,Couro,300,1000 2,Tecido,250,2000 ... I want to skip the first line and read only the integers to a struct I'm using the bellow…