While writing a Perl script, I got a requirement to write the user names with comma separation in only one line of the file.
That's why I would like to know is there any restriction on the maximum size of the line in the .txt file.
Text files are just like any other files and newline character is like any othe character, so only the usual filesize restrictions apply (4Gb size limit on older file systems, file must fit on the disk etc.)
You won't encounter any problem reading and writing it, unless you're reading it line by line—you can run out of memory then or encounter a buffer overflow of sorts. This may happen in any text editor or text processing program (such as sed or awk), because, unlike OS kernel, in those line separation matters
I would suggest keeping one user per line, as it's more natural to read and less error-prone when you process the file with an external program.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With