Layin' down Pipes like a Unix Chad

แชร์
ฝัง
  • เผยแพร่เมื่อ 2 ก.พ. 2025

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

  • @raydeen2k
    @raydeen2k 5 ปีที่แล้ว +317

    % man: why did you get a divorce?
    man:: Too many arguments.

    • @aliencreation8744
      @aliencreation8744 4 ปีที่แล้ว +1

      lmao

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

      I tried this and it open a POSIX Programer's Manual. lol

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

      @@sethsrc792 its actually the manpage for get

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

      @@aprameynaganur7734 ?

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

      @@sethsrc792 when you write man why did you get a divorce it shows you the manpage for get

  • @annoyingmime3081
    @annoyingmime3081 5 ปีที่แล้ว +203

    I hope you make more of these basics videos.

  • @74erPinguin
    @74erPinguin 5 ปีที่แล้ว +318

    Never been so close to subscribing to this channel.

  • @yacek1234
    @yacek1234 5 ปีที่แล้ว +141

    10:37 "The biggest recomendation I can give you is just git gud"

    • @gydo1942
      @gydo1942 5 ปีที่แล้ว +46

      git: 'gud' is not a git command. See 'git --help'.
      The most similar command is
      gui

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

      @@gydo1942 git: 'gud' is not a git command. See 'git --help'.
      The most similar command is
      add

    • @uuu12343
      @uuu12343 4 ปีที่แล้ว +1

      I’m tempted to alias something like that
      alias git-gud=“git”

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

      @@uuu12343 lol

  • @clangerbasher
    @clangerbasher 5 ปีที่แล้ว +61

    When I worked in IT I remember we used to do all sorts with pipes. The Windows guy thought it was magic. We will still be playing with *nix OS's in 50 years time.

    • @EdgardR.
      @EdgardR. 3 ปีที่แล้ว

      @@youtindia Do you have/know of any good source to learn PowerShell?

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

      No magic in pipes, they are just an unnecessarily wasteful way to replace a sequence of function calls.

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

      @@michallasan3695 What a sad boring twerp you are...........

    • @coreygossman6243
      @coreygossman6243 2 ปีที่แล้ว +6

      @@michallasan3695 Bro, pipes are beautiful. I wish every day that other languages had the feature. There is nothing for program flow control so readable as pipes.

    • @michallasan3695
      @michallasan3695 2 ปีที่แล้ว +4

      @@coreygossman6243 They are now also in C++. I am more of a performance guy than readability guy. Thus, I gladly obfuscate my bash scripts for speed. This is why I do not care much about readability of pipes, but rather about the silly thing that every pipe spawns a subshell which seems like wasting resources to me. This is why I prefer subsequent method calls which, after all, is pretty readable, too.

  • @一郎-e1i
    @一郎-e1i 5 ปีที่แล้ว +82

    Btw, Friedrich Nietzsche also used Zathura for his pdfs: thus spake zathura

    • @dill__pickles
      @dill__pickles 5 ปีที่แล้ว +15

      Wow this a very Luke Smith meme

    • @stumbling
      @stumbling 5 ปีที่แล้ว +17

      @@Fooftilly bash: zarathustra: command not found

  • @stumbling
    @stumbling 5 ปีที่แล้ว +34

    This video increased my testosterone by 53%!

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

    Dude.... THANK YOU. I wish you continued to create more of these videos more recently vs so many of the rant/vlog videos. Now, don't get me wrong: you do provide valuable info in (most... if not all) of those videos, however you're so great at teaching things like this so succinctly, in easy to understand/follow videos, I simply would appreciate more of them. Regardless, I appreciate all of the content you create and post for the community & any general viewer. But these happen to fall into the "you don't know what you don't know" catagory. Meaning this info is out there for anyone to learn, but the reason we find out about it or understand it better is because you made a video about it and we come across them coincidentally, or happen to be subscribed.
    Anyway, cheers.

  • @pwnbag
    @pwnbag 5 ปีที่แล้ว +185

    Up next
    *What is the worst Linux distro?*
    Brian Lunduke

    • @thingyee1118
      @thingyee1118 5 ปีที่แล้ว +11

      Reeee

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

      I mean... he's not a Linux distro, but he is fucking terrible.

    • @hanss3147
      @hanss3147 5 ปีที่แล้ว +1

      I think he's talking about Lunduke's video on where he answers what the he thinks the worst linux distro is

    • @sbrazenor2
      @sbrazenor2 5 ปีที่แล้ว

      Everyone knows it's Gentoo, when referencing Lunduke's idea of the worst distro.

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

      @@sbrazenor2 Yah, fuck Gentoo. I use Arch btw

  • @一郎-e1i
    @一郎-e1i 5 ปีที่แล้ว +144

    the Windows Virgin vs. the Unix Chad

    • @irfangazi1473
      @irfangazi1473 5 ปีที่แล้ว +15

      * Windows Incel

    • @userPrehistoricman
      @userPrehistoricman 5 ปีที่แล้ว +13

      Wincel

    • @toast_salad
      @toast_salad 5 ปีที่แล้ว +2

      Windows just got a terminal lol

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

      The virgin Unix vs the chad TempleOS

    • @一郎-e1i
      @一郎-e1i 5 ปีที่แล้ว +3

      @@MrEdrftgyuji RIP Terry

  • @RayGarnerGSU
    @RayGarnerGSU 5 ปีที่แล้ว +69

    a video on awk would be useful. maybe one on git too

    • @Clutter.monkey
      @Clutter.monkey 5 ปีที่แล้ว +40

      Ray Garner do you need him chew your food for you before you eat?

    • @Vlfkfnejisjejrjtjrie
      @Vlfkfnejisjejrjtjrie 5 ปีที่แล้ว +15

      @@Clutter.monkey yeah...and wipe our ass too, thanks.

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

      lmao dude just read the man page

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

      just read the first chapter the "The awk programming language" and you can be productive with it.
      For git read the second chapter of this git-scm.com/book/en/v2

    • @brooksman10
      @brooksman10 5 ปีที่แล้ว +2

      If you can't figure out git... You probably shouldn't be using Linux to be honest.

  • @mamaluigi3083
    @mamaluigi3083 5 ปีที่แล้ว +13

    "man -k ." returned "nothing appropriate" when I first tried to run it. I needed to run mandb as root in order to update the man cache.

  • @A_Box
    @A_Box 5 ปีที่แล้ว +4

    Thanks!
    It was kind of obscure to understand pipes the first time around form the text description only. This demonstration would have helped a lot then and even now it is just so clear.

  • @stephenreaves3205
    @stephenreaves3205 5 ปีที่แล้ว +67

    Luke exiting vim instead of :set filetype=sh??? Has the bloat gotten to him???

    • @LukeSmithxyz
      @LukeSmithxyz  5 ปีที่แล้ว +93

      typing letters is bloat

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

      :e

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

      Even better: `:filetype detect`

    • @realEchoz
      @realEchoz 5 ปีที่แล้ว +8

      I'm pretty sure the fastest way is:
      :w|:e

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

      @@realEchoz Great!

  • @LPFan33
    @LPFan33 5 ปีที่แล้ว +2

    my pipes were not working properly, getting stuck most of the time, but then I was really happy you made a video on plumbing as well

  • @gavinvales8928
    @gavinvales8928 5 ปีที่แล้ว +51

    uh oh someones planning on moving to dwm...

  • @wackydriver
    @wackydriver 5 ปีที่แล้ว +30

    dwm installed, openbsd on thumbnail, YOU FALL AGAIN FOR MEMES LUKE

  • @tahak7411
    @tahak7411 5 ปีที่แล้ว +9

    Absolute chad.

  • @KingZero69
    @KingZero69 5 ปีที่แล้ว +19

    luke pipes em the right way...

  • @julioramirez5497
    @julioramirez5497 5 ปีที่แล้ว +30

    Manual of the manual 🤔

  • @rickyoswald
    @rickyoswald 5 ปีที่แล้ว +26

    It's not POSIX compliant because line 2 is not terminated by a newline character.

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

      3.206 :D

    • @realEchoz
      @realEchoz 5 ปีที่แล้ว +4

      Vim automatically terminates the last line with a newline char.

    • @rickyoswald
      @rickyoswald 5 ปีที่แล้ว +1

      @@realEchoz no it does not. it might be an option but that is not the typical behavior.

    • @realEchoz
      @realEchoz 5 ปีที่แล้ว +6

      ​@@rickyoswald Yes it does. You have to set binary and noeol for it to not do this.
      Try it yourself, create a single line in a text file, save it and cat it and you'll see that it will end in a line break, causing your prompt to appear on the next line, not on the same line as the contents of the file.

    • @rickyoswald
      @rickyoswald 5 ปีที่แล้ว +1

      @@realEchoz >You have to set
      Oh so what I said then.

  • @ertwro
    @ertwro 5 ปีที่แล้ว +18

    I was like "oh, he's gonna explain fifo files and '' " but no. I was wrong oh so wrong.

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

    Great video. You could make a series out of this format

  • @4.0.4
    @4.0.4 5 ปีที่แล้ว +7

    "man up" could be used like RTFM.

  • @HiPhish
    @HiPhish 5 ปีที่แล้ว +6

    Here is a better Awk script:
    awk '{print substr($2,2,length($2)-2) " " $1}'
    This script will print the section number as well as the name of the manual. Luke's script only prints the name, and if a manual resides in multiple sections only the first one will be chosen. If anyone has a simpler way of saying "everything from $2 except the first and last character" let me know.

    • @realEchoz
      @realEchoz 5 ปีที่แล้ว

      sed 's/^\([^ ].*\) (\(.\)).*/\2 \1/'

  • @airilsra
    @airilsra 5 ปีที่แล้ว +6

    For my Ubuntu and Linux Mint brethren out there, to have -Tpdf option you need to have groff installed.

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

      Thanks bro, u just saved me from an hour of figuring out what went wrong.

  • @ChipAltmanxD
    @ChipAltmanxD 5 ปีที่แล้ว

    Thanks Luke! 🤗

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

    very useful! I save my manpages because of portability. or have the man's to review anywhere. Good Job!! Many thanks!!!

  • @Alekov_
    @Alekov_ 5 ปีที่แล้ว +13

    YT comment section is bloat.

  • @AlderDragon
    @AlderDragon 5 ปีที่แล้ว +9

    I really like the syntax highlighting in your terminal. Is that done through st config?

  • @IrizarryBrandon
    @IrizarryBrandon 5 ปีที่แล้ว

    Great, especially, for when you have to print something! Nice video.

  • @ba8994
    @ba8994 5 ปีที่แล้ว +2

    such a chad

  • @mortkebab2849
    @mortkebab2849 4 ปีที่แล้ว +1

    Typing sounds like a stampeding herd of horses.

  • @Forrest-T
    @Forrest-T 5 ปีที่แล้ว +2

    @Luke Great piping! However, one small problem with this example is that there might be more than one man entry in different sections for a given string. For example, "read" is (1) a shell utility that gets input, (2) a Linux system call, (3) a C library function. Each of these has a separate entry, and your script would always select the first one. We can fix it with even MORE piping!
    man -k . | dmenu -l 30 | sed 's/[()]//g' | awk '{print $2 " " $1}' | xargs -r man -Tpdf | zathura -

    • @realEchoz
      @realEchoz 5 ปีที่แล้ว

      Even easier way, using only awk instead of sed, awk and xargs.:
      man -k . | dmenu -l 30 | awk 'system("man -Tps " substr($2,2,1) " " $1)' | zathura -

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

    For those who using `while read`. Read will delete leading whitespaces in string by default. What I usually do to fix that is making alias for read like this:
    alias read='IFS= read -r'
    Empty IFS means that there is no Field Splitting needs to be performed (by default it looks for any whitespaces and splits everything in between into "$@" variable, kinda). -r flag says that string must be saved as is, without treating backslash as special character.

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

    ‘Git Gud’ at laying pipe.

  • @juliopcrj
    @juliopcrj 5 ปีที่แล้ว +1

    Even Mario can't handle that many pipes

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

    I tried doing it your way with zathura but since I run Fedora, the packages are not the same and zathura was missing some obscure plugin package. There is a way to do it with evince though: man -Tpdf ls > temp.pdf ; evince temp.pdf ; rm temp.pdf
    So the whole command ends up being:
    apropos . | dmenu -l 30 | grep -Eom1 '^[^ ]+' | xargs -r man -Tpdf > temp.pdf ; evince temp.pdf ; rm temp.pdf

  • @赵䟏
    @赵䟏 5 ปีที่แล้ว

    Amazing!!! Great help! Thanks a lot!

  • @مقاطعمترجمة-ش8ث
    @مقاطعمترجمة-ش8ث 4 ปีที่แล้ว +1

    5:55 I don't think pipes are temporary files (unless Zathura created that file on the fly )

  • @amir78989
    @amir78989 5 ปีที่แล้ว +31

    This title is underated AF UwU

  • @uuu12343
    @uuu12343 4 ปีที่แล้ว

    What a friggin chad bruh

  • @danthemango
    @danthemango 5 ปีที่แล้ว +2

    man oh man is man a good program

  • @RonnieNissan
    @RonnieNissan 5 ปีที่แล้ว

    wifish list | awk 'FNR>2 {print $1}' | rofi -dmenu | xargs wifish connect
    Wrote my first script ever, yayyyy, Thank you luke smith.
    so my script takes the output of wifish list (wifish is a frontend to wpa_supplicant) pips it into awk which reads from line 3 and up and only the first column and pips that into rofi with dmenu functinality (you could just use dmenu though) then it pips it into xargs with the flag -r so it won't execute anything if you hit ESCAPE, but if you hit one of the APs it will connect to it.
    I am sooo happy hehehe

  • @joemulhern
    @joemulhern 5 ปีที่แล้ว +2

    Dude you are amazing, I love these videos so much. How did you start to learn all of this stuff? Is there a certain channel or blog?

  • @rodrigosouto9502
    @rodrigosouto9502 4 ปีที่แล้ว

    Great tricks, thanks!

  • @aayushnp5430
    @aayushnp5430 5 ปีที่แล้ว

    Very nice! I love these types of videos

  • @shady4tv
    @shady4tv 5 ปีที่แล้ว +2

    6:50
    Why use awk when you can just use:
    cut -d ' ' -f1
    output spacing is predictable so cut might be a bit faster than invoking awk for something so simple. (awk is bloat)
    unix.stackexchange.com/questions/132313/what-are-the-exact-differences-between-awk-and-cut-with-grep

  • @thefekete
    @thefekete 5 ปีที่แล้ว

    Funny I was messing around with doing this with groffer (1) the other day.. But I like your solution a lot better! I made a couple changes though:
    man -k . | dmenu -l 30 | awk '{gsub("[()]", "", $2); print $2, $1}' | ( read c || exit; man -Tpdf $c | zathura - )
    a) If you don't want to have zathura open up when the script starts, but only when a item is chosen, you can pipe the choice to a subshell an use read instead of xargs.
    b) This will always open the first match for a man page found in any section. Thus, it will open groff (1) even if the user selects groff (7). A simple addition to the awk command fixes this by including the section number in the man command.
    c) If if there's no choice, read returns an error code and bails out before opening zathura.

  • @nahushgaikwad
    @nahushgaikwad 5 ปีที่แล้ว

    Awsome knowlege... Would like to see more of such things

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

    My mom once shoulder surfed me while I was chatting on IRC (back in the day when it was still cool :P) and asked me what I meant when asking some guy in a support channel, "How fat is your pipe?". I told her, "Woman, return to the kitchen if you know what's good for you..." Later that day, the ISP called, they were tryin' to sell me some crap-ware "security package" and I was arguing with them about something I can't remember, and told the tech, "Buddy, if you send me another one of those floppy disk with your garbage software on it, I'm gonna: dd if=/dev/zero of=/dev/fd0 bs=4k till the cows come home! Just feed us the pipe and stay out of the security industry". Funny day :P

  • @BrunusRicieri
    @BrunusRicieri 5 ปีที่แล้ว +1

    Saddest thing in POSIX: exit status of pipeline is exit status of last command...

    • @JohnHolmestheSecond
      @JohnHolmestheSecond 5 ปีที่แล้ว

      Why is that an issue?

    • @BrunusRicieri
      @BrunusRicieri 5 ปีที่แล้ว

      too often I find myself wanting the status of the first one... the posix compliant way of doing is a pain:(

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

    This video inspired me to make make life so much easier. Honestly anyone looking into scripting on Linux, should watch it. I made a more or less one-liner VPN switcher with dmenu, which made my life so much easier.

  • @fitzpatrickmathemati
    @fitzpatrickmathemati 5 ปีที่แล้ว +1

    Would be cool to add a flag to mainsplain to let the user "prechoose" the man page. Maybe "mainsplain -s cd" automatically opens the man page for cd in a pdf.

  • @kruxdt6307
    @kruxdt6307 5 ปีที่แล้ว +7

    based

  • @klokibril
    @klokibril 5 ปีที่แล้ว

    nice one luke!

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

    2:28 zathura can read from stdin - woww!!!

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

    I actually made this script and use it pretty often, though I made some changes. I noticed that you can only open the default section of any manpage regardless of which one you choose, so I changed it to:
    man -Tpdf "$(man -k . | dmenu -l 30 | awk '{print ($1, $2)}' | sed 's/ //')" | zathura -
    that way it pipes "man(1)" or "man(7)", instead of just 'man' for both. Also since I use this on a very old computer, running 'man -k .' takes some time which is annoying, so I created a file 'manlist' that stores the result of that command and update it through my .bash_profile. All in all I ended up with:
    man -Tpdf "(dmenu -l 30 < ~/.scripts/manlist | awk '{print ($1,$2)}' | sed 's/ //')" | zathura -

  • @tejasn3835
    @tejasn3835 4 ปีที่แล้ว +1

    how do you run the command at 9:41 without any terminal open

  • @___xyz___
    @___xyz___ 5 ปีที่แล้ว

    xargs is glorious

  • @ulissemini5492
    @ulissemini5492 5 ปีที่แล้ว +16

    8:49 You can actually do :e to reload the file, without exiting vim ;')

    • @ajwadjaved9909
      @ajwadjaved9909 5 ปีที่แล้ว

      How did he get the syntax highlight on?

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

      @@ajwadjaved9909 just saved and reopened the file. When Vim saw the #!/bin/sh leader it recognized it as a script and turned on the highlighting. That's why :e is more efficient, it gets Vim to rescan the file, thereby reading the script header and enabling highlighting.

    • @realEchoz
      @realEchoz 5 ปีที่แล้ว +6

      :w|:e to save and re-edit in one line

    • @skankhunt-dv6ji
      @skankhunt-dv6ji 5 ปีที่แล้ว +2

      Another cool trick you can do in Vim is type “:cia” to make your text glow in the dark

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

      @@realEchoz Again, truly great! Haha

  • @JrIcify
    @JrIcify 5 ปีที่แล้ว

    There are arguments against the idea of pipes but I like them.

    • @jimbarino2
      @jimbarino2 5 ปีที่แล้ว

      What's really cool (for Windows losers) is powershell pipes, which pass whole objects. Next level stuff...

  • @chadgrant8870
    @chadgrant8870 4 ปีที่แล้ว

    great content! keep it up!

  • @PandemicGameplay
    @PandemicGameplay 5 ปีที่แล้ว

    Just want to say this video is freakin awesome

  • @saturnemgs
    @saturnemgs 5 ปีที่แล้ว +1

    I wish I knew about dmenu much sooner. I used to use a zenity based bash function and index files that do what dmenu does. Now I'm gonna have to update a whole bunch of scripts. Thanks ..?

  • @lucdupuy8281
    @lucdupuy8281 5 ปีที่แล้ว

    Hi! Great tip!
    on Debian I had to install groff to get man -Tpdf to work.

  • @OmyTrenav
    @OmyTrenav 5 ปีที่แล้ว +1

    Your videos are great. Thanks! Quick question: you mentioned there are reasons why you prefer using scripts over functions. What are those reasons? Thanks.

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

      He explained that xargs can read from scripts, not functions

  • @kevunger
    @kevunger 5 ปีที่แล้ว

    Thanks Luke vor this video. Suggestion for the topic of a future video, maybe about job queuing on linux. How to make a queue of jobs, independent of the terminal window. I use personnaly task spooler.

  • @rnrteg
    @rnrteg 5 ปีที่แล้ว +1

    New to your channel, love this video and the others I've seen. Quick question, I'm getting an error using man -Tpdf saying that groff thinks pdf is an invalid device. Is there some additional program I need to get this piece working?

  • @HobbitJack1
    @HobbitJack1 8 วันที่ผ่านมา

    Won't this cause a problem with e.g. complex(7), because this will always pull the first page on MANPATH? I think you might want to further use awk (or if you're me, find a way to do it without awk ;) to pull out the section number and ask for e.g. complex.7.

  • @DarkusObscurius
    @DarkusObscurius 4 ปีที่แล้ว

    That's why terminal is more usefull than GUI.

  • @santiagovallejo4071
    @santiagovallejo4071 24 วันที่ผ่านมา

    Maybe instead zathura you can use LaTex, with a custom font like baskerville

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

    Newb here. Any way to make zathura open *after* the desired manpage has been selected?

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

    When I run the script and if I press escape on dmenu to select nothing, zathura still opens a blank window. Can I solve this somehow?

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

    This is very good pipes example, but man to pdf script has some problems.
    Take a 'printf' for example - there is printf(1) and printf(3) /man 1 printf & man 3 printf/
    man -k . | grep printf //not very useful in this case.
    wanna pipes? drill, baby, drill ;>

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

    Functions are good. I had one but decided to go with scripts. If you do it right you can call a specific script multiple times

  • @kainbre
    @kainbre 5 ปีที่แล้ว +2

    How about script that allerts you when you reach crittical battery level? Btw thanks for the video and Larbs!

    • @32th
      @32th 5 ปีที่แล้ว

      I attempted that one and what I came up with is a udev event that sends a signal to a C program which sends a notification. I did that because a command caused by a udev event runs as root but the notification has to be sent as user

  • @ederbit
    @ederbit 5 ปีที่แล้ว

    #02:21 - you can just do 'pacman -Qqs zathura' if you didn't know about that

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

    10:16 the -r flag for xargs isn't POSIX

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

    you mentioned that xargs creates a sub=shell is there any process that doesn't do that i wonder it's the old fork & exec

  • @slackerengi2401
    @slackerengi2401 5 ปีที่แล้ว +2

    Liked just for
    Man -k .
    Thanks boomer Luke

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

    Any reason you are using a hidden name for your scripts directory ( .scripts )?
    Just trying to understand if this is used for something productivity-related.
    Thanks

  • @antuacharjee9145
    @antuacharjee9145 5 ปีที่แล้ว

    Nice syntax highlighting on your shell. Have you switched to fish??

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

    Sweet fucking lord. One question. When PDF is displayed, is there a file somewhere, or is it read from memory?

  • @jesswoode2627
    @jesswoode2627 4 ปีที่แล้ว

    wow thats amazing

  • @Friendsshare
    @Friendsshare 5 ปีที่แล้ว

    Subscribed immediately :)

  • @reverseila4363
    @reverseila4363 4 ปีที่แล้ว

    I have two problems:
    1. When i run this script before even i choose my man page zathura is opened.
    2. I put this script in a PATH folder but everytime i have to source .profile to use it in my bash terminal.
    Os: debian (sid)

  • @ashishpatel350
    @ashishpatel350 5 ปีที่แล้ว +43

    A command named "man"... Feminist outrage intensifies. REEEEEEE 🐸 👌🏽

  • @amir78989
    @amir78989 5 ปีที่แล้ว +1

    Can I get a link to buy your keyboard Luke?

    • @LukeSmithxyz
      @LukeSmithxyz  5 ปีที่แล้ว +2

      www.pckeyboard.com/page/product/UB40PGA

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

    But why? Why would you need these manual in pdf?

  • @MantasGee
    @MantasGee 5 ปีที่แล้ว

    I noticed that as dmenu pops open empty zathura window starts. I presume if you then cancel dmenu it stays open. This makes me a bit uneasy.

    • @avsbq
      @avsbq 11 หลายเดือนก่อน

      😢

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

    awk is pretty chonker tho, so `cut -f 1` is a good alternative for such a simple usecase

  • @Arunscape
    @Arunscape 5 ปีที่แล้ว +7

    the virgin Luke tutorial
    vs the chad ` cat /dev/urandom | base64 | lolcat `

  • @AaronBonBarron
    @AaronBonBarron 5 ปีที่แล้ว

    I really like your squishy brain

  • @alurma
    @alurma 5 ปีที่แล้ว

    Very cool. But why do we have to write "xargs -r man -Tpdf" instead of just "man -Tpdf". Like we didn't have to use xargs in the command after the first pipe

    • @streetster20
      @streetster20 5 ปีที่แล้ว

      `man xargs` will explain it.
      But it takes in stdin and appends it to the command. So `echo ls | xargs -r man -Tpdf` = `man -Tpdf ls`. The man script can't use/read stdin for an argument.

  • @qubit7097
    @qubit7097 5 ปีที่แล้ว

    youre my favorite unix chad

  • @ehllie
    @ehllie 5 ปีที่แล้ว

    I have an issue with zathura. When piping a pfd to it, it just opens a black window that shows just [No name]

    • @LukeSmithxyz
      @LukeSmithxyz  5 ปีที่แล้ว

      Do you have a pdf backend installed?

    • @ehllie
      @ehllie 5 ปีที่แล้ว

      @@LukeSmithxyz I have only those packages with the name pdf in them installed:
      poppler
      poppler-data
      potrace
      texlive-core
      zathura-pdf-mupdf

    • @emanuele6
      @emanuele6 5 ปีที่แล้ว

      @@ehllie are you on arch? if yes, use the command "pacman -Qi zathura" it will show you what packages you need (optional Deps).
      I personally use zathura-pdf-mupdf for PDF support (you need only one package for PDF support).

    • @yarr4429
      @yarr4429 5 ปีที่แล้ว

      You might be missing the '-' at the end, telling zathura to read from standard input.

    • @nerrufam7105
      @nerrufam7105 5 ปีที่แล้ว

      xargs with an s , not xarg

  • @lthiaggo
    @lthiaggo 5 ปีที่แล้ว

    You could cover pipes with redirections in a future video ^^

  • @eyupyorulmaz3410
    @eyupyorulmaz3410 5 ปีที่แล้ว

    -l stands for --lines

  • @meditationstuff
    @meditationstuff 5 ปีที่แล้ว

    cool but no need for dmenu - 'select' is builtin everywhere i think