tr - Transform, Replace and Remove specific characters from strings | #10 Practical Bash

Sdílet
Vložit
  • čas přidán 21. 05. 2024
  • For the longest time I thought "tr" stands for "trim", but it actually means "translate". And this video shows that name makes a lot of sense. You can use tr to transform characters (e.g. lower to upper). Additionally you can remove specific characters (e.g. trim spaces) or you could even filter anything that doesn't match a specific matcher, such as alpha-numeric characters.
    Learn how to use the tr command in this latest terminal tutorial! Enjoy!
  • Věda a technologie

Komentáře • 28

  • @docmalitt
    @docmalitt Před 3 lety +4

    Hey man, I’m stunned with clearness and simplicity of your explanations/examples... I was riding high on the “I wanna be a hacker” wave but realized I suck in basics like grub, bash, regex ing (while at the same time I am in love with my zsh+tmux vimlike workflow)... downloaded masses of books and courses yet this is the best pure/virgin Linux essence I have witnessed in a long time. Please don’t stop. Please...

  • @zidrexandag06
    @zidrexandag06 Před 2 lety

    Hi! I hope you continue this series, I really like your style of teaching. Great videos man!

  • @dmc549
    @dmc549 Před 3 lety

    Very clear and easy to understand. Thanks !

  • @heronleal3582
    @heronleal3582 Před 2 lety

    loves your vidwo and simple explanation about TLS.

  • @appusajeev
    @appusajeev Před 2 lety +1

    Tr seems to be an underrated command. Much simpler in syntax than sed in certain situations.

  • @st3alth_chased643
    @st3alth_chased643 Před rokem

    Well explained

  • @clairegarside9709
    @clairegarside9709 Před 3 lety

    This is great thank you, but how would you amend/delete text from an existing file?

  • @icegoaround7574
    @icegoaround7574 Před 3 lety

    ty. useful stuff.

  • @azminrock94
    @azminrock94 Před 4 lety +1

    hi, i would like to ask, how do I get only unique characters in a string? example: "hello world", output will get helo wrd

  • @jamallmahmoudi9481
    @jamallmahmoudi9481 Před 10 měsíci

    Hi , cool&perfect 🙏🙏

  • @Freeman5679
    @Freeman5679 Před 2 lety

    Hi, that's great. Now, how I could do the sale but at an specific range of lines and columns? Would you help me?

  • @ZakiFootballVideos
    @ZakiFootballVideos Před 3 lety

    thank you

  • @kashyapkiran1729
    @kashyapkiran1729 Před 3 lety +1

    Can you make some more videos on terraform, terragrunt ,terratest. I found your videos are extremely knowledgeable

  • @amritpaudel5788
    @amritpaudel5788 Před rokem

    how did you switch to vim for editing commands?

  • @victorovich90
    @victorovich90 Před 3 lety

    Hmm.
    is being ignored when I run this command. Seems to be reading everything as a raw string despite being included in the man page. Same happens with \t, etc. too.

  • @ShubhamKumarsk1
    @ShubhamKumarsk1 Před 2 lety

    How are you redirecting the command from terminal to vim and then back to stdout again? please explain

  • @CodeTesseract
    @CodeTesseract Před 4 lety +1

    Hey, pls make more videos on terminal commands, will be more helpful..

  • @ca7986
    @ca7986 Před 3 lety +1

    ❤️

  • @xettabyte1
    @xettabyte1 Před rokem

    please countinue the series

  • @kalikali3280
    @kalikali3280 Před 3 lety

    Great! "Tr" can also help to decode or encode. Thanks

    • @kubucation
      @kubucation  Před 3 lety

      Can you give an example? I've never heard of encrypting with tr. You can replace character sequences like in an encoding, but I'm not sure I'd call that encryption, since it basically only obfuscation.

    • @colinweinstein5257
      @colinweinstein5257 Před 3 lety

      Substitution ciphers are types of encryption, such as vigenere and the caesar ciphers, and would be easily accomplished using this translate command. They are incredibly basic and easy to decrypt though.

  • @ujjwalchetan4907
    @ujjwalchetan4907 Před 2 lety

    Can you tell me the name of your terminal theme?

  • @sk-xs3cd
    @sk-xs3cd Před rokem

    How to store this in variable

  • @aleenshrestha8119
    @aleenshrestha8119 Před 2 lety

    how u edit comand in vim

  • @mvargasmoran
    @mvargasmoran Před 2 lety +1

    And there was no example for capitalization...

  • @theowl2
    @theowl2 Před 3 lety

    ❤️