Anonymous user
Talk:Remove lines from a file: Difference between revisions
m
indentation tweak
(By default I would just return an errorlevel, if appropriate parameters were not provided.) |
m (indentation tweak) |
||
Line 1:
I'm not sure if this qualifies so much as a file system operation as data processing. A filesystem is part of the operating system, or sometimes intrinsic to a language's virtualized representation of a filesystem. I ''suspect'' that even describing this task as specific to the concept of a file may be inappropriate; it may be more appropriate to apply it to a buffer into which a file was read, or which maps to the context of some text field. By leaving it nonspecific, it can cover special case-behaviors (such as file-specific) as well as general-case behaviors (such as operating on arbitrary buffers of text). --[[User:Short Circuit|Michael Mol]] 02:19, 13 July 2011 (UTC)
==Argument order==
How about specifically ''not'' setting the order of arguments? This would allow the creation of a program that by default did one thing, but could be given options to remove specified options from a file.
Woops, I've thought of something that is close to this. What do you think about creating a command line utility "extract" that by default extracted the first line from a file and printed it to stdout whilst leaving the file behind with its first line missing. extract could be given two options: a starting line (defaults to 1), and the number of (this and subsequent), lines to extract (defaults to 1). Missing lines return the null string (without a line terminator). If the file ends without a line terminator then the if that line is returned then it is without a line terminator. Numeric options should not be zero or negative. --[[User:Paddy3118|Paddy3118]] 06:55, 13 July 2011 (UTC)
|