Questions tagged as 'txt'

2
answers

Add to Text File Using Pascal

I made this algorithm in Pascal which feeds numeric information into a text file. program Pascal; var i:integer; Vect:array[1..1001] of integer; Myfile: text; begin i:=1; for i:=1 to 999 do vect[i]:=i+1; Assign(Myfile, 'My...
asked by 15.02.2016 / 15:30
1
answer

Write current directory in a text file

In a batch program I have: echo Date >c:\users\...\testecmd.txt Writes the current date to a text file. Assuming I do not know where the directory in which the self executable is, how do I get it to call the Current Directory inste...
asked by 17.02.2016 / 04:15
1
answer

PYTHON Saving a result in txt

I have this code that generates combinations of numbers When I squeeze, he starts the combinations what I want and that it save these combinations in a txt file import random c1 = (random.choice([9, 9])) c2 = (random.choice([1, 1])) c3 = (ran...
asked by 27.12.2018 / 01:19
1
answer

How to find specific words in a txt file in python?

I need to make software that looks for words in the code and saves the next line in a string. I did not find anything how to do this anywhere, I just found one that counts the number of words in the file like this with open('File_of_data.txt',...
asked by 14.10.2017 / 04:39
1
answer

Convert .log file to .txt in Bash

Hello, I would like to know how to convert a generated .log file into a container in Docker and convert it to a txt file using Bash.     
asked by 13.09.2017 / 15:55
1
answer

Delete last blank line txt php

I have a txt file and I need to delete the last line, but it is blank. I tried the code below and it erases only the top line of the last one that would be the one that is blank. Follow the code below: $lines = file('file.txt'); $last =...
asked by 07.11.2016 / 19:08
1
answer

Store number of values in a PHP txt

I have the following information in a txt file. 500038;204932;61312;FTE GAV EDIT LACAVA TOTAL LARGXALTX15 GAV. NORMAL;LACA BLU FOSCO#996#335;5;78101922;xxxxxxx;0204932005 500038;204932;61312;FTE GAV EDIT LACAVA TOTAL LARGXALTX15 GAV. NO...
asked by 11.11.2016 / 14:41
1
answer

save in the txt file the result of the sql query in firebird using Delphi

I need to save the result of a query inside the txt file by separating by a delimiter, I am extremely new to delphi and firebird, so any help is welcome code below: procedure TForm1.btPesquisarClick(Sender: TObject); var arquivo: TextFile;...
asked by 13.12.2018 / 15:15
1
answer

Problem with accent when generating txt in php

I am using the code below to generate a txt file but it is generating a strange code. <?php header("Content-Type: text/html; charset=UTF-8",true); $fp = fopen("bloco.txt", "w"); $eu = 'é'; fwrite($fp, $eu); fclose($fp); ?>     
asked by 12.09.2018 / 16:47
1
answer

Assign text in TXT file to a variable

Good morning! I'm running a project that is working normally but would like to automate it more to gain time in the operation. In case my project takes a text file the main words that I have described inside the "text" variable and put it t...
asked by 25.04.2018 / 15:51