Talk:Reverse the order of lines in a text file while preserving the contents of each line: Difference between revisions

→‎Even worse: added a couple of comments.
mNo edit summary
(→‎Even worse: added a couple of comments.)
 
(11 intermediate revisions by 5 users not shown)
Line 1:
==I can take no more==
I've added a reference which I hope brings all this to an end!--[[User:Nigel Galloway|Nigel Galloway]] ([[User talk:Nigel Galloway|talk]]) 14:54, 4 August 2021 (UTC)
 
==Incredibly vague task==
Once again, the master of vagarity has struck. Some details need to be hammered out for this to be a task.
Line 42 ⟶ 45:
 
Thank you. Done it--[[User:CalmoSoft|CalmoSoft]] ([[User talk:CalmoSoft|talk]]) 04:17, 4 August 2021 (UTC)
::What is the order of the lines??? I'd prefer "Show the lines of a file in reverse order" suggested below
 
== re-wording of the task requirements ==
Line 56 ⟶ 60:
I renamed the task as you suggested.--[[User:CalmoSoft|CalmoSoft]] ([[User talk:CalmoSoft|talk]]) 13:58, 4 August 2021 (UTC)
 
I suggest "Reverse the order of lines in a text file while preserving the contents of each line." --[[User:Wherrera|Wherrera]] ([[User talk:Wherrera|talk]]) 14:40, 4 August 2021 (UTC)
 
I renamed the task as you suggested.--[[User:CalmoSoft|CalmoSoft]] ([[User talk:CalmoSoft|talk]]) 03:51, 5 August 2021 (UTC)
 
We seem to be heading towards over-specific task names - the name needn't be the task description :).
<br>How about "Show the lines of a file in reverse order".
<br>I like Nigel's observation that the task is to implement the Linux "tac" command, so maybe ''Implement the Linux "tac" command'' would be good (the task description could then say that only reading from standard input need be supported, text files only, native OS definition of a line, etc. etc. Perhaps multiple input files could then be a stretch goal ? --[[User:Tigerofdarkness|Tigerofdarkness]] ([[User talk:Tigerofdarkness|talk]]) 17:17, 4 August 2021 (UTC)
 
:+1 obviously flattery will always do that, but in the interests of intellectual integrity I should point out that Laurence wrote the Unix Shell entry. I don't understand Walter Pachl's objection as tac rogers.txt does exactly what this task demands.--[[User:Nigel Galloway|Nigel Galloway]] ([[User talk:Nigel Galloway|talk]]) 14:52, 5 August 2021 (UTC)
 
:::I googled tac and see that tac actually accepts several files and "each file" and "separately" then make sense. I wonder, however, who needs this in real life. Rgds. --Walter Pachl 16:35, 5 August 2021 (UTC)
 
Here is the help text about unix tac:
<pre>
copies each FILE (‘-’ means standard input),
or standard input if none are given,
to standard output, reversing the records
(lines by default) in each separately.</pre>
--[[User:Wherrera|Wherrera]] ([[User talk:Wherrera|talk]]) 17:40, 4 August 2021 (UTC)
:::from worse to worst: You are not changing the order of lines IN A TEXT FILE!!
"Show the lines of a file in reverse order" sounds perfect!
 
:::BTW The tac explanation doesn't impress me at all :-) ..Walter Pachl 06:51, 5 August 2021 (UTC)
 
:::: Nor was I impressed with the '''Bash Tac''' command wordage. &nbsp; It is slightly confusing with its verbiage &nbsp; (as how it is (or could be) applied or used as per this Rosetta Code task's requirements. &nbsp; It would fit better to be placed in the &nbsp; ''discussion'' &nbsp; page for this task instead of the task's preamble. &nbsp; &nbsp; -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 18:57, 5 August 2021 (UTC)