Read a specific line from a file: Difference between revisions

Content deleted Content added
Miks1965 (talk | contribs)
PascalABC.NET
Aartaka (talk | contribs)
Add ed example
 
Line 770:
Readln;
end.</syntaxhighlight>
 
=={{header|ed}}==
 
ed works on files by default, so all that's needed to read the seventh line is addressing it. In case there's no such line, a useful error message is printed by ed itself, with no effort on the programmer side.
 
<syntaxhighlight lang="sed">
# by Artyom Bologov
H
7p
Q
</syntaxhighlight>
 
=={{header|Elixir}}==