Skip to main content
16 events
when toggle format what by license comment
Oct 29, 2022 at 18:56 answer added Tuxic timeline score: 0
Aug 14, 2018 at 11:34 history edited Stéphane Chazelas CC BY-SA 4.0
edited title
Aug 14, 2018 at 10:50 history edited Jeff Schaller CC BY-SA 4.0
title typo fix
Apr 25, 2017 at 10:40 comment added Jeff Schaller If any of the existing answers solves your problem, please consider accepting it via the checkmark. Thank you!
Jul 9, 2016 at 10:01 history edited Kusalananda CC BY-SA 3.0
Markup and minor grammar.
Jul 9, 2016 at 0:28 answer added Jeff Schaller timeline score: 3
Jul 8, 2016 at 10:59 comment added Nithin Santhosh @MelBurslan In file.txt I have three lines for example : This is a new file. Second line: The name of the file is newFile Third line : I have not created the new line. So by using grep command how can I print the first line only? Also How which command will help me to print both first and last line? Can you guys please tell me the commands for both the questions?
Jul 7, 2016 at 19:11 comment added DKing grep is not the best tool for printing the first line of a file. If you simply meant that you wanted to print the first line matched with grep, or if you have some specific use for grep, please let us know what that is. If we had more context, perhaps we could give an answer that would better help you and the community.
Jul 7, 2016 at 19:10 answer added steeldriver timeline score: 85
Jul 7, 2016 at 19:01 answer added Kusalananda timeline score: 26
Jul 7, 2016 at 19:00 comment added MelBurslan @steeldriver you need to make it an answer as it is the way to do it with grep, strangely selected tool for the job.
Jul 7, 2016 at 18:53 review Low quality posts
Jul 7, 2016 at 18:54
Jul 7, 2016 at 18:42 answer added Kurt Heisel timeline score: 7
Jul 7, 2016 at 18:40 comment added clk Would head -1 file.txt not work?
Jul 7, 2016 at 18:38 review First posts
Jul 7, 2016 at 18:40
Jul 7, 2016 at 18:37 history asked Nithin Santhosh CC BY-SA 3.0