Display file contents in columns with the "column" command

Поділитися
Вставка
  • Опубліковано 19 гру 2024

КОМЕНТАРІ • 52

  • @terryhenyo9216
    @terryhenyo9216 2 роки тому +16

    There are some distributions like ZorinOS that doesn't have the -T, -N, and -o flags. However they are available in distros like Manjaro.

    • @DistroTube
      @DistroTube  2 роки тому +9

      Much like some of the GNU coreutils have alternative versions that sometimes distros ship with, some distros do ship a 'column' command that is not the one from util-linux. They ship a 'column' that is part of the bsdutils I think. It's annoying when distros veer from the norm because...yes, you're missing some cool flags.

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

      Probably. In the BSDs, column(1) lacks those flags. The BSD and Linux man pages all agree that column was introduced in 4.3BSD-Reno. It is not in POSIX.

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

      @@DistroTube can confirm this is the situation in Linux Mint, too. Thanks for the clarification, man page states it's from BSD too.

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

      @@DistroTube If I have so many search result.
      What if I want to add a line only before or after the first result. without giving line number. Using sed. or other examples also please.
      Like.
      Server
      Server
      Server
      ----‐------------- to
      New line
      Server
      Server
      Server

  • @Not-THAT-ChrisPratt
    @Not-THAT-ChrisPratt 2 роки тому +29

    Please keep these "Linux Basics" videos coming! I learn so much from your teaching and examples.

  • @zahimeen
    @zahimeen 2 роки тому +8

    With every new video you post, I actually learn something that benefits me.

  • @corypollard
    @corypollard 2 роки тому +2

    Another great video, Derek. I've been a hobby Linux user for over 20 years now and still learn more and more from your informative and always high quality content. I hadn't heard of the column command before and can think of lots of uses for it already.

  • @_..---
    @_..--- 2 роки тому +8

    it's always surprising how many useful tools can be found on even a standard install, this is one of the best channels and I especially love it for highlighting them

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

    Thanks @Distrotube now I can retire an old bash function to create tables -> header rows and the record rows from input. It's amazing what you learn about Linux whatever level/time you've been using it!

  • @RickRomig
    @RickRomig 2 роки тому +4

    Thanks, DT! I have a script I use to view log files for many of my cron jobs and I'd been looking for an easy way to display a header when I view the logs in the script. The column command does the job.

  • @Hyperboid
    @Hyperboid 2 роки тому +4

    Personally, I use tabs as my field separator, in case anyone wants to edit it as a spreadsheet. I also give the file a .tsv extension so the programs detect it.

  • @santiagonottoli
    @santiagonottoli 2 роки тому +2

    Hey DT! 👍👍👍 Great tutorial... muchas gracias mi amigo!

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

    Many thanks for this tutorial. I do remember someone else pointing out the existence of the "column" command some years ago, but I completely forgot about it - and it's now a command that I am going to go back and build into some of my recent shell scripts.
    I can't remember if it was you or "The Holy Church of Luke Smith" that did a video a few years ago about writing a script that just pulled up a random man page for you to read when you have a few minutes each day - I think I will have to look that up again and start using it so that I do remember that such commands are available.

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

      random man command,
      That sounds like a useful script, any chance of a link?

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

    That's cool! Never heard before about this command. Will be use to it. Thanks.

  • @tudbut
    @tudbut 2 роки тому +4

    thank you, somehow i never knew about this tool!

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

    Presumably things like ls use column under the hood to format their output. Cool little utility. Implementing it probably makes for a nice programming exercise too, depending on how many options you want to implement.

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

    This is pretty neat. I was using awk to do a lot of table display stuff, maybe I'll see if column will work for me because awk is annoying to type, especially when you need a header above the columns.

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

    Thank you - very useful tips.

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

    Your video is usefully!, thanks for your video.

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

    Column -t -s ":" "Comment:Name
    :Thank You:Derek
    "

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

    Great tutorial thanks for this!

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

    Neat. Didn't know about this one

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

    Does someone know why so many distros has enabled the annoying pcspkr in their kernels? I noticed it in Arch and Manjaro isos recently and now Ubuntu.

  • @vaisakh_km
    @vaisakh_km 2 роки тому +2

    map vim keys as
    :map :'

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

      Oh! Hey! What! Dude! I've been dreaming about this the last week

  • @uuu12343
    @uuu12343 2 роки тому +4

    How the heck do I not know this?!
    It's been years and I'm a power user, wtf
    Clearly not power enough
    MORE POWER...
    *UNLIMITED*
    *POWAAAAAAAAAA*

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

      you are a power user.. it's just
      linux's powers are endless

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

    Thanks DT!

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

    Thanks, very helpful

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

    If I have so many search result.
    What if I want to add a line only before or after the first result. without giving line number. Using sed. or other examples also please.
    Like.
    Server
    Server
    Server
    ----‐------------- to
    New line
    Server
    Server
    Server

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

    Hey DT, would you ever make a video talking about Linux from Scratch and it's use for learning linux, maybe your experiences with it and whether you would recommend taking the time to set the system up. Thanks!

  • @CarlosReyes-ku6ub
    @CarlosReyes-ku6ub 2 роки тому

    Hi DT, can you share your thoughts about org-roam and maybe show us some tips and tricks? It'd be very useful

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

    take a look at soda linux for the next distro review.

  • @SB-qm5wg
    @SB-qm5wg 2 роки тому

    Pretty cool.

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

    hay man plz test Penrose 0.2.1
    Penrose: a library for building your very own tiling window manager

  • @paulw4487
    @paulw4487 2 роки тому +2

    dammit this beats awk printf

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

    Kinda reminds of top or htop or something like that layout. Hmmm. o.o

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

    thats cool never knew about it

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

    Column? Never heard of that, although I read some books about Linux and shell!

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

    Interesting

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

    WOW!
    My Mint Mate 20 'column' command has NONE of those neat options. It just does columns & table with NO headings or whatever.
    If I want nice tables with headings I'd have to pipe it into an awk script as I do with many things - AWK!
    cat something | column | some.awk
    Well, anyway, the Mint repository has been deplorable of late.

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

    👍

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

    hey dt!

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

    GVDT.

  • @leviticus8930
    @leviticus8930 2 роки тому +2

    Early bird

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

    OMG you just showed your passwords someone is going to hack you!

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

      The /etc/passwd file has not contained passwords for some years now. Encrypted passwords are held in /etc/shadow only.