Linux Tutorials | cut command | Splitting a file vertically | GeeksforGeeks

Поділитися
Вставка
  • Опубліковано 5 жов 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! :)
    #likethisvideos #linux #geeksforgeeks

КОМЕНТАРІ • 35

  • @samabad95
    @samabad95 3 роки тому +4

    You just got me a bonus point on my Homework. THANK YOU!!!!

  • @KDTechverse
    @KDTechverse 9 місяців тому +1

    Simple n precise. Thanks GFG!

  • @ArunKumar-mu3xn
    @ArunKumar-mu3xn 3 роки тому +5

    Thankyou, but it seems there is no difference b/w -b and -c

  • @ndonthy
    @ndonthy 4 роки тому +1

    Thankyou for sharing tutorial. this helped me understand better

  • @jasveersingh1761
    @jasveersingh1761 3 роки тому

    very good explaination...... thanku u cleared my confusion.

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

    I understand all of the things that you explain ,Thanks

  • @sonnyebhos129
    @sonnyebhos129 4 роки тому +1

    Very easy to understand, Thanks

  • @Animaldubbingcomedy
    @Animaldubbingcomedy 8 місяців тому +1

    Thank you so much 🙏

  • @abhishek.chakraborty
    @abhishek.chakraborty 5 років тому +4

    What is the different between '-b' and '-c' option ?
    Both seem to specify character positions to cut at.
    Please provide example showing different output for 'cut -b M' and 'cut -c M'

    • @rikkoo
      @rikkoo 2 роки тому +1

      they mean the same thing, but the -c is there to work with utf-16 / utf-8 chars like the greek dictionary while the -b only works with ascii chars

    • @abhishek.chakraborty
      @abhishek.chakraborty 2 роки тому

      @@rikkoo Thanks 🙏🏻🙏🏻

  • @cyrilcycadiou9962
    @cyrilcycadiou9962 2 роки тому

    can't thank you enough u saved me a lot of time ♥

  • @Spaniards56
    @Spaniards56 2 роки тому +1

    Thanks a lot! Just one question: Why in the 2nd example "Ankr" which has 4 letters is included among the 1-3, and 5-7? How the 4 got filtered?

    • @KDTechverse
      @KDTechverse 9 місяців тому

      Hi, so you see we're working here with two ranges :
      1. 1-3
      2. 5-7
      A range has two factors :
      1. Lower bound/starting point
      2. Upper bound/ending point
      One thing which is missed in most of the tutorials is to mention the fact that WITHIN THE DEFINED RANGES THE LOWER AND UPPER BOUNDS ARE BOTH "INCLUSIVE"
      This means that when I write 1-3 that would cut out characters ranging from the "1st" character to the "3rd" character where inclusiveness means both the 1st and 3rd character will be found in the result of cut command. Similarly, for 5-7 range the 5th and 7th character will be there in the result including the characters between 5th and 7th characters as well.
      Now, the 4th character isn't a part of either 1st range (1-3) or the 2nd range (5-7) hence it is ignored in the result string. This is why considering the word you have mentioned :
      Ankur
      It's a word with 5 characters. So for the 1st range (1-3) the following characters are picked or cut off : {'A', 'n', 'k'} and similarly for the 2nd range (5-7) only one character is picked or cut off : {'r'}, now notice that the 4th character is not picked through either of the defined ranges. That'd why the result string is : Ankr (combine the characters obtained through both the defined ranges).
      Hope this helps in understanding the cut command's working better. Let me know if you any other doubt's I'll be happy to help.

  • @fishstraws626
    @fishstraws626 Рік тому

    Thank you sir. Love the accent btw

  • @dalirch8496
    @dalirch8496 Рік тому

    thank's for the video is so helpful i subscribe keep the good work

  • @bornee942
    @bornee942 2 роки тому

    thank you sir, that was very clear !

  • @suhanibhagat8939
    @suhanibhagat8939 10 місяців тому

    Thanks a lot✔️

  • @ytubs
    @ytubs 2 роки тому

    absolutely fantastic

  • @mohamedelalfy7863
    @mohamedelalfy7863 3 роки тому

    nice explanation

  • @armanella3612
    @armanella3612 10 місяців тому

    What if I want not just first field , bust also last one?

  • @jeniferjeyaraj3282
    @jeniferjeyaraj3282 4 роки тому +1

    How cut -d works?

  • @fernandonadamas
    @fernandonadamas 2 роки тому

    Thank you so much!!

  • @MAli-lt3ch
    @MAli-lt3ch 2 роки тому

    how can we find the fields in any randomly written text file..

  • @prernaarora2746
    @prernaarora2746 2 роки тому

    Thanks a lot sir

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

    Thank you very much for this wonderful video

  • @rubaabkam6430
    @rubaabkam6430 Рік тому

    Thank u❤❤

  • @securityhunter9820
    @securityhunter9820 3 роки тому +1

    dude who will explain what exactly -f does

  • @chibexphilip
    @chibexphilip 2 роки тому

    Thanks for this

  • @atulcpu
    @atulcpu 3 роки тому

    Well explain d

  • @asingh4090
    @asingh4090 3 роки тому

    This 5min video can take anyone in comma. You were sounding that lethargic.

  • @mesharialqarni8873
    @mesharialqarni8873 2 роки тому

    olahy mrgalh 3la alm863.

  • @pintusarkar2604
    @pintusarkar2604 3 місяці тому

    can't you talk normally ? 😪