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

Поділитися
Вставка
  • Опубліковано 13 лип 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 4 дні тому

    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 3 місяці тому

    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.

  • @muddyexport5639
    @muddyexport5639 3 роки тому +3

    Just keep it up -- good vids.

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

    These series are awesome! Please continue!

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

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

  • @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

  • @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.

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

    very good episode bro. love your work

  • @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

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

    beautiful work DT

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

    Thank you! Very good videos. Keep it up.

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

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

  • @mansourq6512
    @mansourq6512 3 роки тому +2

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

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

    Yes, you should continue. Very helpful information.

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

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

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

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

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

    precise and on-point video. thank you!

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

    Thanks a lot , DT. ☺️

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

    thank u very much it was really helpful

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

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

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

    Awesome! Thanks!

  • @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."

  • @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!

  • @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.

  • @wizardatmath
    @wizardatmath 4 місяці тому

    Fabulous ❤

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

    Good work. Teaching other than just entertaining.

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

    Nice!

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

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

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

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

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

    Useful

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

    Please, continue.

  • @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

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

    big fan

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

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

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

    great

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

    This basics are great, do one of "patch"

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

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

  • @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

  • @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.

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

    Can you make a video reviewing Andronix?

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

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

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

    sed could probably do something approximating classes with regex

  • @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

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

    do a video on the "rename" command

  • @pedrocosta2273
    @pedrocosta2273 19 годин тому

    ctrl+l to clear the screen

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

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

  • @seiferseifer
    @seiferseifer 3 роки тому +2

    "ThIs Is A lInE Of tExt"

  • @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.

  • @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

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

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

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

    Imagine paring this with a db!

  • @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!