Questions tagged [line-by-line]

Line By Line is a NodeJS module that helps you reading large text files, line by line, without buffering the files into memory.

114 questions
0
votes
1 answer

how to search for a string in text file using PHP

i have a php code that read TXT file and display its content. i want to allow the user to make a search on any word he want and if its available the system will display it with the line number. until now i was able to read the text and display it…
Rany Fahed
  • 39
  • 3
  • 11
0
votes
1 answer

Understand JavaScript Synchronous vs Asynchronous

I am new to JavaScript, Node.js in particular, and I have 2 functions that I am trying to execute. One gets data from a file and passes it to a list, and the other reads from that list in order to get one of the lines from the text file. My code…
Michael
  • 169
  • 1
  • 2
  • 14
0
votes
1 answer

"read" command not executing in "while read line" loop

First post here! I really need help on this one, I looked the issue on google, but can't manage to find an useful answer for me. So here's the problem. I'm having fun coding some like of a framework in bash. Everyone can create their own module and…
Nim
  • 158
  • 2
  • 14
0
votes
2 answers

Remove duplicates in text file line by line

I'm trying to write a Python script that will remove duplicate strings in a text file. However, the de-duplication should only occur within each line. For example, the text file might contain: þ;ABC.001.123.1234;þ;;þ;10 ABC\ABCD\ABCDE;10…
a-goonie
  • 99
  • 1
  • 10
0
votes
1 answer

Not able to access value in nodejs code

I have following code in my nodejs function. Even if the IF condition is true, I am not getting values updated for stringResponse variable. var fs = require('fs'), byline = require('byline'); var stream =…
AbhiDwi
  • 93
  • 1
  • 3
  • 9
0
votes
0 answers

How to skip a line with fgetc in C

I have a do loop that prints out a given text file line by line. It works great, but I want the program to not print an entire line if said line starts with a specific character (in this case, #). do { c = fgetc(file); if (c != compare[0])…
jjyj
  • 377
  • 4
  • 15
0
votes
2 answers

I want to use conditional formatting to highlight a cell in one column if the corresponding line in another column contains a specific value

I am working in Excel Professional Plus 2010. I have searched and the only things I've found are either doing individual line by line highlighting or searching and highlighting an entire column. I have three long columns I am comparing (E & O & P),…
0
votes
1 answer

Bash/awk: when pattern not present print "not present" only once, not per line

I am searching for a pattern in a field of my file with several rows. If the pattern is present I would like to output that row. However, if the pattern is not present at all I would like to output something like "missing". awk…
PsoAD
  • 25
  • 5
0
votes
2 answers

How can I write an EDN line by line? (spit, seq of hashmaps)

I have data like that tab = ({"123" data} {"456" data} ... (whatever, it is a lazy sequence of hashmaps). I want to write it into an edn file line by line, so I did this (map (fn[x] (spit "test.edn" x :append true)) tab) The problem is that I…
Joseph Yourine
  • 1,301
  • 1
  • 8
  • 18
0
votes
4 answers

read line by line from richtextbox and show in label (vb.net)

I would like to read line by line from richtextbox and show each line every a second in label. I have this code blocks. and I think I need a timer but I couldnt make it. can you help me ? Remarks : If I use this code , I can only see the last line…
Olgu Kivanc
  • 11
  • 1
  • 1
  • 6
0
votes
3 answers

getline line by line and then store entire lines in an array in C

I'm trying to store every line separately in an array of strings. It doesn't work the way I've written it obviously all I'm getting when I try to print array[0] is the last line of the textfile. But when I print the variable "line" inside of the…
felle
  • 11
  • 1
  • 4
0
votes
0 answers

Read line by line and inserting into mysql nodeJS

I made some code to parse things from some file.log it got 2 different lines that one is line of command and finishing line. So there are 1 000 000 lines of log which is 500 000 entries into DB. Problem inserting and updating database is to…
0
votes
1 answer

Nodejs line-by-line close calling next line?

I'm using the plugin line-by-line to read a very large file. There's a case where I want just the first line, so I'd close the connection immediately in that case. However, I was noticing that it would try to process the next line regardless. I…
Randy Hall
  • 7,716
  • 16
  • 73
  • 151
0
votes
2 answers

How do you read a text file, line by line, and separate contents of each line in Java?

I was wondering how to go about reading a file, and scanning each line, but separating the contents of each line into a Char variable and into a Double variable. Example: Let's say we write a code that opens up text file "Sample.txt". To read the…
Manny
  • 71
  • 1
  • 1
  • 11
0
votes
2 answers

Android: Read a text file from assets from custom line

I'm using this code to read text from assets: private void Read(String file){ try{ String Name = file; Name = Name.replaceAll("'", ""); file = getAssets().open(Name + ".txt"); reader = new…
Web.11
  • 406
  • 2
  • 8
  • 23