Two Powerful Command Line Utilities 'cut' And 'tr'

แชร์
ฝัง
  • เผยแพร่เมื่อ 25 ก.ค. 2024
  • Recently, I've made videos on command line utilities like 'awk' and 'sed'. In this video, I cover two powerful command line utilities--'cut' and 'tr'. The 'cut' command removes sections from each line of a file. The 'tr' command translates or deletes characters from standard input.
    REFERENCED:
    ► linux.die.net/man/1/cut
    ► linux.die.net/man/1/tr
    WANT TO SUPPORT THE CHANNEL?
    💰 Patreon: / distrotube
    💳 Paypal: www.paypal.com/cgi-bin/webscr...
    🛍️ Amazon: amzn.to/2RotFFi
    👕 Teespring: teespring.com/stores/distrotube
    DONATE CRYPTO:
    💰 Bitcoin: 1Mp6ebz5bNcjNFW7XWHVht36SkiLoxPKoX
    🐶 Dogecoin: D5fpRD1JRoBFPDXSBocRTp8W9uKzfwLFAu
    📕 LBC: bMfA2c3zmcLxPCpyPcrykLvMhZ7A5mQuhJ
    SOCIAL PLATFORMS:
    🗨️ Mastodon: distrotoot.com/@derek
    👫 Reddit: / distrotube
    📽️ LBRY/Odysee: odysee.com/$/invite/@DistroTu...
    DT ON THE WEB:
    🕸️ Website: distrotube.com/
    🐿️ Gemini Capsule: gemini://distro.tube
    📁 GitLab: gitlab.com/dwt1
    FREE AND OPEN SOURCE SOFTWARE THAT I USE:
    🌐 Brave Browser - brave.com/dis872
    📽️ Open Broadcaster Software: obsproject.com/
    🎬 Kdenlive: kdenlive.org
    🎨 GIMP: www.gimp.org/
    🎵 Audacity: www.audacityteam.org/
    💻 VirtualBox: www.virtualbox.org/
    🗒️ Doom Emacs: github.com/hlissner/doom-emacs
    Your support is very much appreciated. Thanks, guys!
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 81

  • @crazychicken0378
    @crazychicken0378 3 ปีที่แล้ว +69

    I wouldn’t even know how to find these utilities so continuing this series of videos is actually heartwarming

    • @hocky-ham324-zg8zc
      @hocky-ham324-zg8zc 3 ปีที่แล้ว +12

      To learn more about these types of utilities, you can run “ls /usr/bin” to find pretty much any program that I assume DT will talk about. There will likely be a lot of programs here, but you can run “man [program]” to find out what it does (most, if not all of these programs should have man entries). For example, if you run “ls /usr/bin”, you will see “tr” come up as a result. So you can run “man tr” which will show a bunch of information on the TLDR of its purpose, and how to use it

  • @alvaroconde
    @alvaroconde 16 วันที่ผ่านมา

    This video is fantastic! It's dynamic, full of concrete information, and moves quickly without losing clarity. It strikes a perfect balance, delivering content comprehensibly without rushing through it. Please continue sharing more videos on Linux commands and their combinations!

  • @janbodnar7815
    @janbodnar7815 3 ปีที่แล้ว +5

    these kinds of videos are much better than constantly reviewing new distros

  • @michaelkrailo5725
    @michaelkrailo5725 4 หลายเดือนก่อน

    I never use cut because of the deep dive into awk but had to learn it so I could decipher other peoples scripts. This was informative on what the limitations are for the cut command as I was unaware of how the extra spaces could throw off cut.

  • @mikebrown8239
    @mikebrown8239 3 ปีที่แล้ว +9

    Yes please continue. I enjoy all of your videos. Thank you so much.

  • @raviroy7882
    @raviroy7882 3 ปีที่แล้ว +3

    This series you are doing DT is awesome, especially if someone is interested in shell scripting. These techniques even though basic are quite powerful when complemented with the power of shell scripting. Please continue with this series. Thank You.

  • @mehmetkaraman3710
    @mehmetkaraman3710 3 ปีที่แล้ว

    these series are legitimately good. keep them coming, DT!

  • @paintmysh1t
    @paintmysh1t 3 ปีที่แล้ว +1

    These series are awesome! Please continue!

  • @livelifekingsize1983
    @livelifekingsize1983 ปีที่แล้ว

    very good episode bro. love your work

  • @meeexy116
    @meeexy116 3 ปีที่แล้ว +2

    really enjoying this type of videos. Would love to see more.

  • @fahimabrar2922
    @fahimabrar2922 3 ปีที่แล้ว +1

    I love this new series of videos. Thank you

  • @swami1111
    @swami1111 2 ปีที่แล้ว

    Thank you for these series....really very helpful 👍

  • @marcin774
    @marcin774 3 ปีที่แล้ว +1

    beautiful work DT

  • @taidee
    @taidee 3 ปีที่แล้ว +1

    I definitely like this series, this is a super back to basics series.

  • @mariusavram7823
    @mariusavram7823 3 ปีที่แล้ว +1

    Thank you! Very good videos. Keep it up.

  • @mansourq6512
    @mansourq6512 3 ปีที่แล้ว +2

    Thank you so much and please keep up your great job .... THUMBS up as usual

  • @muddyexport5639
    @muddyexport5639 3 ปีที่แล้ว +3

    Just keep it up -- good vids.

  • @MarkMcNallyJE
    @MarkMcNallyJE 3 ปีที่แล้ว +11

    You should do something like a quick fire overview of utilities like shuf, tac, nl etc most people could use these but won't know about them!

    • @marco7centurion
      @marco7centurion 3 ปีที่แล้ว

      My mind was blown when I found out about tac

    • @agenttank
      @agenttank 3 ปีที่แล้ว

      @@marco7centurion yeah, using it for a few days now as well... ls -lt lists file by mod-date... when i want them sorted the other way around i use "ls -lt | tac" :-D

    • @scyth2
      @scyth2 3 ปีที่แล้ว

      @@agenttank Hmm, I find "ls -ltr" easier to type.

    • @agenttank
      @agenttank 3 ปีที่แล้ว

      @@scyth2 oh thanks

  • @pessimisticbengali265
    @pessimisticbengali265 3 ปีที่แล้ว

    precise and on-point video. thank you!

  • @sunshadow9704
    @sunshadow9704 10 หลายเดือนก่อน

    Thank you Sir. You are being concise and to the point.

  • @notalinuxguruguy8063
    @notalinuxguruguy8063 3 ปีที่แล้ว +1

    Yes, you should continue. Very helpful information.

  • @hiqmatoyedeji9527
    @hiqmatoyedeji9527 ปีที่แล้ว

    thank u very much it was really helpful

  • @atarg2239
    @atarg2239 3 ปีที่แล้ว +1

    Thanks a lot , DT. ☺️

  • @aehjr1
    @aehjr1 3 ปีที่แล้ว +1

    Not even finished viewing the video, and still say, "Nicely done! You neatly avoid the (usual) UUOC seen in many UNIX/Linux primers."

  • @alvfig
    @alvfig 3 ปีที่แล้ว

    Awesome! Thanks!

  • @BrucesWorldofStuff
    @BrucesWorldofStuff 3 ปีที่แล้ว +1

    DT... Yes please continue.
    Thanks for the video!
    LLAP

  • @bhaveshverma8629
    @bhaveshverma8629 3 ปีที่แล้ว

    Very userful tutorial

  • @nickrees4706
    @nickrees4706 5 หลายเดือนก่อน

    Super useful. Cut is going to ‘cut down’ my use of awk 😅

  • @nithale
    @nithale 3 ปีที่แล้ว

    Thanks again now I really understood Unix means do one thing and do it well.

  • @PauloConstantino167
    @PauloConstantino167 3 ปีที่แล้ว

    Good work. Teaching other than just entertaining.

  • @zestynotions
    @zestynotions 3 ปีที่แล้ว

    I think its great to have a reminder of the great tools that most have on their computer already

  • @wizardatmath
    @wizardatmath 5 หลายเดือนก่อน

    Fabulous ❤

  • @tostoday
    @tostoday 3 ปีที่แล้ว +1

    Yes Walmart gave lessons of this the other day on my Chromebook 😁

  • @mitchelvalentino1569
    @mitchelvalentino1569 3 ปีที่แล้ว +18

    @DistroTube I enjoy these videos on old-school Unix tools like cut, tr, awk, sed, etc. Have you had a chance to learn ‘sort’ and ‘uniq’?

    • @SkyyySi
      @SkyyySi 3 ปีที่แล้ว +5

      Do sort and uniq really need an explanation video though?

    • @mitchelvalentino1569
      @mitchelvalentino1569 3 ปีที่แล้ว +4

      @@SkyyySi sure, why not? What may be easy for us may be challenging to others. Also, DT has made videos on many entry-level topics. I mention sort and uniq specifically, because they’re powerful and easy to learn, yet often overlooked.

    • @DistroTube
      @DistroTube  3 ปีที่แล้ว +6

      Yea, I'll probably do sort and uniq. Probably throw shuf in there too.

    • @mitchelvalentino1569
      @mitchelvalentino1569 3 ปีที่แล้ว +4

      @@DistroTube good call on shuf. I’m _really_ digging these command line videos!

  • @LenQuerido
    @LenQuerido 3 ปีที่แล้ว

    Nice!

  • @ChrisAthanas
    @ChrisAthanas 3 ปีที่แล้ว +1

    Useful

  • @SlideRSB
    @SlideRSB 3 ปีที่แล้ว +3

    I would have included "paste" in this video since it's basically the inverse utility of "cut". I also think "paste" is a very useful and often overlooked utility.

    • @LordOfWizardurl
      @LordOfWizardurl 3 ปีที่แล้ว

      Yeah very nice. I use paste for making a database file from many curls. It is awesome. And does my work like a charm. And i can acess them through awk or i can make markdown tables with sed

  • @michalbotor
    @michalbotor ปีที่แล้ว

    linux: everything is a file
    linux commands: everything is a text processor

  • @raulbonifacio5116
    @raulbonifacio5116 3 ปีที่แล้ว

    Please, continue.

  • @rtvikkatarya3634
    @rtvikkatarya3634 3 ปีที่แล้ว +1

    big fan

  • @jorgemezger8299
    @jorgemezger8299 3 ปีที่แล้ว

    This basics are great, do one of "patch"

  • @Sanmayce
    @Sanmayce 3 ปีที่แล้ว +1

    Can you made a video about removing/printing all duplicate lines?
    It is often needed when a sorted file has to be cleared of duplicates.

  • @ashas1537
    @ashas1537 2 ปีที่แล้ว

    great

  • @FreeRoger
    @FreeRoger 3 ปีที่แล้ว +1

    i dare you to make a video [or a series] on linux from scratch

  • @shreym03
    @shreym03 3 ปีที่แล้ว +1

    This is weird but could you make a video about how to make our own dotfiles?

  • @SFSAtlas
    @SFSAtlas 3 ปีที่แล้ว

    Can you make a video reviewing Andronix?

  • @scifregizmoguy
    @scifregizmoguy 3 ปีที่แล้ว +2

    You make a video on 'cut' but leave out 'paste'?

  • @robimalco
    @robimalco 3 ปีที่แล้ว

    Ehy @DistroTube, can you make a video about that is happening with Audacity please?

  • @heriyansyahmirsuma7421
    @heriyansyahmirsuma7421 3 ปีที่แล้ว

    Hey dt how about a video for voice command linux programing or show case. I thing it would be a cool video

  • @KyleLanmon
    @KyleLanmon 3 ปีที่แล้ว

    sed could probably do something approximating classes with regex

  • @aaronexia3110
    @aaronexia3110 3 ปีที่แล้ว

    do a video on the "rename" command

  • @omarmagdy1075
    @omarmagdy1075 2 ปีที่แล้ว

    really like this video but would like to note that sed would can pretty much do what tr did through basic regex knowledge for example you can replace lower case to upper case with this command:
    *echo "This is a line of text" | sed 's/[a-z]/\U&/g'*
    and upper to lower with this one:
    *echo "This is a line of text" | sed 's/[A-Z]/\L&/g'*
    you could also replicate the compliment function with the carrot symbol ^ inside square brackets like so:
    *echo "this is some text and numbers 1234" | sed 's/[^0-9]//g'* (This means that anything that is not a digit replace it with empty string)
    but of course using tr for these tasks would probably be a better idea

    • @ashokg4008
      @ashokg4008 2 ปีที่แล้ว

      It’s about writing a more readable solution

    • @omarmagdy1075
      @omarmagdy1075 2 ปีที่แล้ว

      @@ashokg4008 I was just pointing out that sed can probably do anything with proper knowledge of regexes

  • @sergten
    @sergten 3 ปีที่แล้ว +1

    What's that 'command not found' processor that printed 'Roses are red'?

    • @DistroTube
      @DistroTube  3 ปีที่แล้ว +1

      gitlab.com/dwt1/bash-insulter

    • @sergten
      @sergten 3 ปีที่แล้ว

      That's awesome. If you're planning a video on shell scripting - maybe use this as an example.

  • @cpubug
    @cpubug 3 หลายเดือนก่อน

    11:02 rose are red. violets are blue. I have five fingers. an the middle is...*🤣🤣🤣🤣🤣

  • @pedrocosta2273
    @pedrocosta2273 13 วันที่ผ่านมา

    ctrl+l to clear the screen

  • @seiferseifer
    @seiferseifer 3 ปีที่แล้ว +2

    "ThIs Is A lInE Of tExt"

  • @aserillll
    @aserillll 3 ปีที่แล้ว +4

    DT hair config pls

    • @SFSAtlas
      @SFSAtlas 3 ปีที่แล้ว +2

      Go to a barber and ask for "bald"

    • @0xva
      @0xva 3 ปีที่แล้ว +1

      hair bloat

  • @hassanawodi5888
    @hassanawodi5888 3 ปีที่แล้ว

    Imagine paring this with a db!

  • @Nathanwithz
    @Nathanwithz 3 ปีที่แล้ว

    for passwords I would use [:graph:] rather than [:print:]

  • @gustavomaurizio2606
    @gustavomaurizio2606 3 ปีที่แล้ว

    Just use regex

  • @sevenbark
    @sevenbark ปีที่แล้ว

    Good stuff! Here's a 'tr' that does a rot13 on text:
    tr 'a-zA-Z' 'n-za-mN-ZA-M'

  • @greob
    @greob 3 ปีที่แล้ว +1

    Nice!