Top "Text-files" questions

Open in Notepad, WordPad, or many other programs designated as text editors.

Get the number of lines in a text file using R

Is there a way to get the number of lines in a file without importing it? So far this is …

r file text-files
fprintf and ctime without passing \n from ctime

I have an issue with inserting time in a text file. I use the following code and i get |21,43,1,3,10,5| Wed …

c file text-files printf ctime
How do I limit (or truncate) text file by number of lines?

I would like to use a terminal/shell to truncate or otherwise limit a text file to a certain number …

shell unix sed text-files head
How can I compare files in a JUnit test case?

I want to implement JUnit on a small project I'm working on because I want to learn a little bit …

java unit-testing junit text-files
How do you dynamically identify unknown delimiters in a data file?

I have three input data files. Each uses a different delimiter for the data contained therein. Data file one looks …

python parsing csv text-files textinput
How can I format the data written to a text file to be done in columns?

Hi I have a bunch of data Im writing to a text file, each line of the rows holds about 4 …

java text-files bufferedwriter
Java FileWriter - Append Line of Text File

I have a button in a GUI, and when the button is pressed the user has the ability to add …

java newline append text-files filewriter
StreamWriter.WriteLine() is not working

I am trying to write several lines, one at a time, to a .txt file using StreamWriter.WriteLine (Not statically). …

c# file-io text-files vs-unit-testing-framework
Importing Tab Delimited Text File with Multiline Cells (to Excel or Access)

The tab delimited text file that i am trying to import looks like this (4 fields, Field 3 is multiline)... and about 100,000 …

excel text-files tab-delimited
Remove empty lines from txtfiles, remove spaces from start and end of line

Which one would be better: sed -e '/^$/d' *.txt sed 'g/^$/d' -i *.txt Also, how do I remove …

bash sed text-files spaces replace