Linux Tutorials | Print line between M and N lines head and tail combined | GeeksforGeeks

Поділитися
Вставка
  • Опубліковано 14 жов 2024
  • This video is contributed by Anant Patni.
    Please Like, Comment and Share the Video among your friends.
    Install our Android App:
    play.google.co...
    If you wish, translate into local language and help us reach millions of other geeks:
    www.youtube.com...
    Follow us on Facebook:
    / gfgvideos
    And Twitter:
    / gfgvideos
    Also, Subscribe if you haven't already! :)
    #likethisvideo #linux #geeksforgeeks

КОМЕНТАРІ • 4

  • @NoEgg4u
    @NoEgg4u 5 років тому

    tail with the "-f" option is very handy for monitoring a file.
    If the lines that tail displays should change (for example, more data is written to the file), you will see the change.
    This is handy for monitoring a log file.

  • @abhijeetawari9371
    @abhijeetawari9371 4 роки тому

    it did not work well with me after applying some tails cmd with pipes then used head for top 3 line ,o/p of those tail did not got passed to the head

  • @maheswaris3735
    @maheswaris3735 4 роки тому

    I get the input from user , I’ll write like
    read num
    read y
    //num is 5 and y is txt file
    head -n $num $y
    It shows error as head:invalid number of lines:’3

    Could someone help with this?

  • @arpit39agarwal
    @arpit39agarwal 5 років тому

    can't we use head -n states.txt|tail -n +5 ??