Pls clarify why we are use minus (-) and plus (+) symbol .. tail and head commands .. ? And usage . 2. If I need 10th line how can write the command 3. Usage of sed command ?
I know this is late, but I thought I should put this here incase anyone else needed this. If you want to see the 10th line you just have to put a head into a tail command like: head -n 10 file_name | tail -n 1 This command gets the first 10 lines using the head command. Then it pipes that into a tail command which takes the last line of the first ten lines, which in the end gives you the tenth line. If you say wanted to get lines 12-15 you could do: head -n 15 file_name | tail -n 4 This command uses the same principle of the last one, but instead of getting just the 15th line, it gets the 15th line and the 3 lines before it (line 14, 13, and 12). Hope this helps someone, somewhere, someday.
it was an excellent video and it helped me for understanding head and tail concepts :)
Short and informative video.👌
appreciated man!
Thankyou sir
Pls clarify why we are use minus (-) and plus (+) symbol .. tail and head commands .. ? And usage .
2. If I need 10th line how can write the command
3. Usage of sed command ?
I know this is late, but I thought I should put this here incase anyone else needed this.
If you want to see the 10th line you just have to put a head into a tail command like:
head -n 10 file_name | tail -n 1
This command gets the first 10 lines using the head command. Then it pipes that into a tail command which takes the last line of the first ten lines, which in the end gives you the tenth line.
If you say wanted to get lines 12-15 you could do:
head -n 15 file_name | tail -n 4
This command uses the same principle of the last one, but instead of getting just the 15th line, it gets the 15th line and the 3 lines before it (line 14, 13, and 12).
Hope this helps someone, somewhere, someday.
If I want to display 5th to 8th lines what is the command?
I dont know how to find and open silvaco on linux redhat.please guide me
Suppose koi book h notepad m to uske bhi first nd last lines display ho jaengekya plz someone tell ??
Yes dear.
How to see first 15 lines
head -n 15 filename
@@MilchiDE thanks bro replying
domo aregato