Bash is Bloated!

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

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

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

    Why did you even need a shell? Just send your instructions to kernel itself.

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

      any program allowing such operation would be considered a shell ;P

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

      @Joel Silva having a keyboard at all is too bloated, just short out the correct wires instead for input

    • @abstractapproach634
      @abstractapproach634 4 ปีที่แล้ว +68

      @@jan_harald typical millennial with your new fangled "plug" technology, real programmers grab a magneto and get cranking!

    • @Microphunktv-jb3kj
      @Microphunktv-jb3kj 4 ปีที่แล้ว +2

      cons from Slant about bash : ))
      One of the most dangerous languages around
      What it is mostly used for are file system operations. Guess what it is bad at? Operating on files. It automatically splits and carries out filename expansion on every single string resulting from variable expansion and command substitution unless quoted, by default on whitespace, whilst spaces are very common in filenames. Before that, it even does pathname expansion, so woe to anywone who does not want to actually operate on files, but has a globbing metacharacter stored anywhere in a variable. This means what you store in a variable is not going to be what will ACTUALLY be accessed. If an empty variable is unquoted, it disappears completely due to word splitting, sometimes leading to applications signalling a missing parameter at a wrong position. If quoted however, said variables cannot be iterated over in a loop, no matter what character one uses for word splitting. If you use any globbing pattern with a command, be sure to use -- after the option arguments or if none are present, before starting the pattern with a mandatory ./ Otherwise, another Bash script run gone wrong or a hacker can create files named like an option ("-f", for instance) and your program will happily accept it as such, if it results from globbing. For interactive use, it is convenient. For programming, it is a no-go.

    • @overgrownkudzu
      @overgrownkudzu 4 ปีที่แล้ว +40

      @@jan_harald punch cards are the only real way

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

    the library is bloated with books

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

      Letters are bloated with ink

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

      barnyard I've never felt this defensive over serif fonts in my life.

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

      @barnyard yeah. books should be written with least amount of lines possible to make reading more efficient.

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

      most girls are bloated with hair

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

    The biggest hurdle with writing POSIX shell scripts is that searching for anything shell related will lead you to bash specific answers.

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

    #!/bin/shhhhhh that's a library!

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

      Too good :')

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

    bash is one of the slowest shells?
    oh man it feels like lightspeed if you have to use the Windows commandline regularly...

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

      Or wsl bash..

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

      @@gideons6126 oh god I haven't touched that cursed piece of software yet

    • @weakspirit_
      @weakspirit_ 4 ปีที่แล้ว +61

      i used powershell once. boy, i've never felt as much lag as an ls command should. fuck the c# shell.

    • @excitableboy7031
      @excitableboy7031 4 ปีที่แล้ว +8

      Protip: minimise the terminal to make it go faster. Also you're wrong, powershell is one of the better shells ever written. Way better than bash, and i'll die on this hill. MS are too retarded to use it properly and their terminal is basically hitler and satan.

    • @pt8306
      @pt8306 4 ปีที่แล้ว +31

      @@excitableboy7031 PowerShell-IsGood...... No it's not. It's syntax sucks, it's slow, and nothing uses it.

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

    Shellcheck? That's a Haskell program! You're willing to install Haskell to use this simple tool...but Bash is bloated? ;)

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

      EXPOSED

    • @jonas-pq8cd
      @jonas-pq8cd 5 ปีที่แล้ว +4

      @Christopher Medlin right

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

      Hello world in haskell compiles to a megabyte-sized binary.
      *Read more*

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

      fight! fight! fight! :v :v :v

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

      @@pipoper101 I want to read more you bastard

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

    Dont even bother scripting, just write everything in C

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

      holy C*

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

      Rust is what the cool kids are doing now.

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

      C compiles down to Assembly which is bloated. Write everything in microcode :p

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

      @@wilfridtaylor Yeah, reverse engineer the CPU you have so you can have microcode that only works on a small amount of CPUs...great idea

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

      @@MrSlashStudios the number of different CPUs is too bloated

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

    *crack* Ah, sh. *sips* that was a good shell.

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

    Bash is actually resonably fast if you stay in the shell.
    When you use externals a lot (grep, sed, awk, head, tail...) Bash is SLOW....
    Also, The Regex operator in bash is =~ try it. I have been rewriting a lot of scripts to use this
    instead of grep, sed, awk etc. Especially my web scrapers.
    It understands Extended Regular Expressions, ERE and creates an array with the matches it finds.
    Have fun and always keep learning.

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

      [neizd@core ~]$ cat to1m.sh
      i=0
      END=1000000
      while [ $i -le $END ]
      do
      i=$((i + 1))
      done
      [neizd@core ~]$ time dash to1m.sh
      real 0m1.064s
      user 0m1.047s
      sys 0m0.000s
      [neizd@core ~]$ time bash to1m.sh
      real 0m3.421s
      user 0m3.391s
      sys 0m0.016s
      [neizd@core ~]$

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

      You said it yourself “when you use externals...” Do you think Bash is slow when the cause of the slow down is a bunch of external processes that Bash forks out? Bash is just a glue.

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

      Bash is glue + function, You would be amazed at what it is capable of doing on it's own.
      stuff you would do with tr, sed, grep, head, tail, wc..... much of this can be done in bash.
      For me Web scrapping is so easy in bash.
      working with json or xml is easy.
      on and on...

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

      @@jamesharrison7469 tr, sed, awk, head, tail, wc, xargs, etc they are NOT Bash! So many people confuse these programs as parts of Bash.

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

      @@magno5157 That's my point, Stay in the shell.
      The thing is, to do one or two function? Fine use an external.
      If it's repetitive? find a way to do it with shell internals.

  • @Pabloparsil
    @Pabloparsil 4 ปีที่แล้ว +18

    For those wondering, there are benchmarks in stackoverflow and dash takes about half or even a quarter of the time to run. Not huge in my opinion but a nice way to speed things up. Anyway if you want speed it seems like trying to stick with awk whenever possible is best

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

      Why not dash for scripts and zsh for user interaction?

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

      @@justadude8716 Bashisms are often too convenient and in regular shell usage, it's unnoticeable

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

      As long as it's mawk or nawk. I understand Gnu Awk (gawk) is a lot slower, which is why Ubuntu installs mawk by default.

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

    It's a very important topic. One thing you may want to look at moving forward, is that while sh is always going to be in /bin/sh ; bash might not be.
    In BSDs you'll find bash in /usr/local/bin/bash
    There is an easy solution, that is actually best practice for cross-platform compliance, is to use the `env` command.
    `env` returns the value of the binary in your environment. It is always in /usr/bin/env - see below for how to use it in a bash script, that will work, cross platform. :)
    #!/usr/bin/env bash

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

      Even sh isn't sure to be in /bin/sh, Linux is moving to unified directories and both /bin and /sbin and a couple others are depricated. They have been symbolic links to /usr/... in most of the mainstream distros for a few years. (The only reason for the original /bin /usr/bin split was physical device space limitations on the PDP-7 and 11 used to develop Unix.)

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

    Breathing is bloated.

  • @fn-ix
    @fn-ix 4 ปีที่แล้ว +5

    The virgin microprocessor vs. the chad abacus.

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

    vim is bloated. use cat >

    • @romanhredil3799
      @romanhredil3799 4 ปีที่แล้ว +10

      CAT ABUSE NOT ALLOWED

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

      @@romanhredil3799 then use 'bat'

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

      after 3 years I guess you can now apply for the yearly "cat award" in the unix community

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

    When you’re so posix compliant you don’t know if the world is real.

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

    Thanks for making this video. Especially thanks for not using a giant mostly empty frame to sow what amounts to text. So many people make those and they’re damn hard to watch without full screen on a desktop. This was watchable ON MY PHONE!!! Awesome.

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

    Hi, mksh developer here ☻ thanks for the mention!
    Note that mksh does implement a few bashisms (just as bash implements things like [[…]] which are kshisms), but not this one; diff between two processes is actually the only time I temporarily switch to GNU bash myself.
    For better performance, link mksh statically (beats dynamically-linked dash in speed even!) and add the optional printf builtin, which you’re going to be using a lot in POSIX scripts unless you actually check for the ksh print builtin first and use that if present. Note that the printf builtin does not and cannot have floating point (%f) though…

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

      Good job on mksh!

    • @your-mom-irl
      @your-mom-irl ปีที่แล้ว +1

      I will manually enter a valid iee754 floating point binary 32 bits value into the command line and use %f bro. And you cannot stop me

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

    This is the first time ever I've heard Bash or a shell for that matter is slow. You had my curiosity, now you have my attention.

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

    Yeah yeah bash is slow. But who writes CPU-bound scripts in bash anyways? Process substitution is a killer feature.

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

      I'd like these word to sing themselves

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

      Mainly, most optimizations is done in the design level and not in the language one chooses to write. For example, intead of reading all the file just to see the first one, you could just read the first. It could be done chooseing wisely the commands we would run. The optmization he is telling us to do is nearly negligible (in the execution time), and sounds like choosing C++ instead of python to write scripts.

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

      ​@@MrRenanwill Platform specific optimizations can add up for frequently executed programs.

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

    3:37: Process substitution isn't (just) a bashism, it's a Korn shell innovation; bash just copied it from ksh88 or ksh93 (and enabled it by default).

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

    A bloated shell will use more battery life per process because it requires more power so dropping bash might gain someone a little better battery life on their laptops. Sure, it might not be much, but as any system engineer knows the less a cpu has to do, the less power it will use.

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

    Thanks for that insight Luke. But how slow is slow? Could you do a example benchmark for differnt scripts? If it´s only a few ms every now and then I don´t see the caveat.

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

      [neizd@core ~]$ cat to1m.sh
      i=0
      END=1000000
      while [ $i -le $END ]
      do
      i=$((i + 1))
      done
      [neizd@core ~]$ time dash to1m.sh
      real 0m1.064s
      user 0m1.047s
      sys 0m0.000s
      [neizd@core ~]$ time bash to1m.sh
      real 0m3.421s
      user 0m3.391s
      sys 0m0.016s
      [neizd@core ~]$

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

      ​@@gregoriodia I know a pretty good way of optimizing your code. =)
      $ cat to1m_old.sh
      i=0
      END=1000000
      while [ $i -le $END ]
      do
      i=$((i + 1))
      done
      $ time bash to1m_old.sh
      real 0m2,990s
      user 0m2,986s
      sys 0m0,005s
      $ cat to1m_new.sh
      exit 0
      $ time bash to1m_new.sh
      real 0m0,003s
      user 0m0,000s
      sys 0m0,003s
      Most of the optimization is done in the design level and not in the shell you choose to run.

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

    Interesting... Been using bash for years haven't really noticed a huge lag.. I'm guilty of using bashisms all over the place. Great video, feeling challenged!

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

      It is popular for a reason.

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

    There are two POSIX shells /bin/sh which should be a Bourne shell and /bin/ksh which should be a Korn Shell. ksh is the POSIX extended shell. Many systems do have a ksh type shell as bin/sh but not all and this is less common UNIX unix. bash started out as a ksh clone, it's gotten quite fat and slow over the years though.

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

    1:20 an elaborate way to say "I use arch btw"

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

    "Don't get it twisted" - Linguist and Nix User, 2019

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

    I just want to say thank you Luke. I've learnt a great deal from you, you've really upped my unix game

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

    If you're having to worry about performance while using bash, then you shouldn't be using bash.

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

    What's next, terminal emulators are bloat; be one with the tty?

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

      SimGunther Computers are bloat!

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

      @@AnonymousUser77254 CPUs and their ISAs are bloat

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

      SimGunther hard drives are definitely bloat. My commodore PET doesn't have a hard drive.

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

      xterm is pretty big though, last i checked. There are alternatives to xterm.

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

      you might take this as a joke, but I actually have a little 13 inch laptop, with ONLY tmux on it, and NO XServer
      which actually satisfies my twisted needs and perverted perfectionism

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

    I hear TempleOS is good. No bloat there.

  • @yurt-page
    @yurt-page 2 ปีที่แล้ว +1

    BusyBox which is used in rescue shell, on embedded devices, in Alpine for containers or OpenWrt for routers actually uses Dash but modified and has more bashisms like $RANDMON variable.
    So you may see a /bin/sh scripts that actually have bashisms and that's fine.
    You can run them with #/bin/busybox sh

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

    I use zsh and that one is even more bloated than bash, I have a feeling.

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

    What is POSIX and why should I care?

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

      POSIX is the de-facto standard for unix-like systems (like linux or BSD). When making programs and scripts that are POSIX compliant you assure that users of different system cofigurations can run them on their system.

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

      BenRangel Just like POSIX Shell having many implementations such as Bash, ZSH, Yash, etc, awk also has different implementations. Gawk is one of them and it’s probably very common and it contains extensions that are not specified by POSIX. There are many programs standardised by POSIX and still contain many extensions not specified by the standard.

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

      If you're using an interactive shell there's no reason to care - just use fish. This isn't 1980.

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

    So... no it won't run shell scripts as bash scripts if /bin/sh is linked to bash. Bash will run with strict POSIX compliance if called as sh

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

    Shhh be quiet. This is a library. I'm trying to study...

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

    Hi Luke, great video! I've only got one question: why did you show mksh at first and then you showed that you have /bin/sh symlinked to dash? Is there any reason you symlinked /bin/sh to dash instead of mksh?
    Thank you in advance!

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

      dash is faster, while mksh tries to be an interactive shell. For example mksh has features like a config file and other things, while dash doesn't, so while it's faster, it's not necessarily an option for using interactively.

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

      @@LukeSmithxyz thank you! I probably missed that part in the video, in case you explained it already :)

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

      @@LukeSmithxyz mksh tries to be primarily a great scripting language that can also be used interactively well, though without the bling-bling. Then comes POSIX compliance, then comes compatibility to other shells.
      The performance of mksh and dash is pretty close (dash *is* somewhat simpler), and mksh-static will beat dash any day ☻
      Startup files are not read for scripts, only interactively (and they’re in the appropriate if branch so this doesn’t slow dow at all).

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

    use (d)ash
    for about 80% of time it works fine ;P
    10% you have to work around bashisms, and other 10% is **insert problem here**
    for some reason I remember it having some tiny enhancements, without finding any source right now...
    I'd really love a posix version of () as those are SUPER nice and hackable...you can do `echo "hello there >(sed s/hello/goodbye/) >(tee -a /tmp/log) >(xargs -- ls -lha) >(xargs|cd)` etc etc...

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

    You can never please everyone and although I don't agree here and there, I'm always learning something! Keep doing those videos!!! Thanks!

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

    Where did you learn all this stuff? Could you please link some online resources here, or on your website for people who wish to do it as well?

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

    I like that you chose to make this tutorial at a library . i feel like stepping through the screen to peruse the shelves

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

    I'm glad I write my scripts in python.

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

    Of course, mksh isn’t narrowly POSIX-compliant, it’s an implementation of ksh. And IIRC the author wants to implement process substitution as well.

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

      Yeah, when I find a way to do that that doesn’t slow down things too much or breaks them, and is reasonably portable.

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

    The title of this video really does not give the content justice. I learned a lot of good information that I'll be using in my everyday script writing, but the title did not alert me to the fact this would be informing me about why it's important to write POSIX-compliant scripts.

  • @TheThunderSpirit
    @TheThunderSpirit 6 หลายเดือนก่อน

    bash is slow - two questions - why and by how much?

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

    I think it would be better to put #!/usr/bin/env bash instead of #!/bin/bash for more portability

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

      Which Linux-compatible systems don’t have /bin/bash?

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

      @@lawrencedoliveiro9104 Android

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

      @@brlin Would /usr/bin/env bash work there?

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

      dunno about android, but FreeBSD, OpenBSD and Nix come to mind which don't have /bin/bash but have /usr/bin/env. it also gives user more control over which bash is going to be used for the script, in case there's more than one, as it gets one from the $PATH

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

    I tried switching from bash to dash, but it broke a bunch of the Manjaro i3 scripts. Not sure I want to deal with fixing them. But the idea of this video is cool.

  • @WilliamDye-willdye
    @WilliamDye-willdye 5 ปีที่แล้ว +4

    The tradeoff of slower execution is rarely a problem, and all of the distros I'm currently using have Bash installed by default, so I'll take the bloat (until something better comes along).

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

      In any case, shells are kind of not all that different from each other. Even the much loved zsh is just a mishmash of POSIX stuff and non-portable bells and whistles. No revolution happening in shells yet.

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

      @@SisypheanRoller nushell is trying to do something different

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

    Windows command line (Batch/CMD) > Bash

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

    "Bash is Bloated!"
    > uses bash
    🤔

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

      You REALLY missed the point :facepalm:

  • @md.imamulislam7
    @md.imamulislam7 5 ปีที่แล้ว +2

    6:43 Which file manager is that? Ranger?

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

    Serious question: What is the font you're using in your terminal? Thanks!

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

    Nice subliminal message with the off grid thing.

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

    Mkay?

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

    Everything I don't like is bloated
    A youtuber's guide to making titles

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

      yknow... except systemd

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

      lmao, as bloated as systemd is its not nearly as bad as that intel pxe shit on old thinkpads.

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

    I use systemd bash, systemd kernel, systemd gcc and systemd graphical environment on Redhat Systemd/Systemd os.

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

      I use MS Windows 10. (Basszus ezt a csávót magyarok is nézik?)

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

      @@ezengondolkozom3700 I don't use hungarian. I use en_US.UTF-8.

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

      @@Zoltan_Gyarmathi *cries in UTF-16

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

    Possics compliant shell? Whats it say?

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

    mksh may not have process substitution but ksh93 does. I suppose mksh is more of a ksh-88 clone?

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

    i stick to bash , nice and steady for simple launchers and compares
    posix compl. is for repo work

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

    very impressive shell familiarity ! do you have any opinions on setting the firrst-script-line "hash-bang" to /usr/bin/env instead of hardcoding a path to the interpreter ?

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

    /bin/sh is owned by the bash pacman package (pacman -Qo /bin/sh). This means that when you update bash, the link to bash will be restored. Your change will be overwritten. There is no correct way to change /bin/sh to anything other than bash because the bash package specifies that it "provides" "sh" and many core packages specify their shell dependency as sh. In other words, it is a design decision of the Arch developers to use bash as the posix sh implementation for the distro and I don't see an option to change this correctly (in a way that won't break after there is a pacman bash update).

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

      Use a pacman hook. Check the Arch Wiki for dash.

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

      To confirm that in its current state it will indeed break with an update, just run 'pacman -S bash; ls -l /bin/sh' and you'll see that the symlink is restored.

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

    I guess you can say it got *bashed* pretty hard.

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

    Why is posix compliance important?

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

    As someone who uses ZSH, I cannot relate

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

    my man has maxed out 'tech lord', and 'presentation' skills.

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

    linux kernel is bloated

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

    But what if some scripts in /usr/bin have bashisms? Should I point each one to /bin/bash?

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

    6:40 - LF ?

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

    Is that suckless terminal? I'm trying to find the shortcut for resizing on the fly (I'm using your build), but I can't find it anywhere.

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

      @@semenkuzovchikov8150 Nah, tried it, and various combinations with ctrl and plus etc. I guess it's in another file or something. Thanks for replying though!

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

      kmg its Windows key + Shift + u/i/o/p

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

      This setting is in the i3 config, also it must be in windowed mode it if the only open program, using windows + shift + space

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

      @@batemanboi9672 Thanks. In my system it was key + shift + u/d. Weird that it's not mentioned somewhere as it's nice and useful thing. Looking at config.h I couldn't find it, but it works now. Also it works on any window in i3, either if it's only window on a workspace in fullscreen mode or if it's floating/non floating in any other setting. I will take a look at Luke's i3 config again. Thanks again for your help.

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

      @@batemanboi9672 But I still have no idea how key+shift+u/d works for me. Nothing in my i3 config suggests that, also nothing in config.h of my suckless build :O

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

    The link on Debian by default is dash.

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

    shellcheck is nice

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

    I want to know which are bashisms & which are POSIXisms. Also, I got really annoyed trying to build audacity on TinyCore because its configure ran all scripts in /bin/sh, even a bash script.

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

    Life is bloated!

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

    is luke really at the library or is he using a green screen? if he's in a legit library that is ultimate chad mode

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

    When writing posix compliant shell scripts and you want to do process substitution what do you do as an alternative? Write to a temporary file and clean up afterwards?

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

      I heard named pipes are suitable for the job.

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

    During the "Identifying bashisms" step on the arch wiki, their checkbashisms script that scans /usr/bin/ shows a TON of output . It even identifies some pretty important, more system-level files as containing bashisms, as for example libtool and lsb_release, bzgrep and a ton of TeX related stuff. How did you deal with this? Did you fix them manually? Did you ignore most of the output?

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

      btw I use arch

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

      @@rijnder333 I know it's an old comment but my advice is to not change sh to dash or mksh or anything of that nature. Arch is filled to the brim with Bashism with Pacman using them as well. While you are free to change the session shell for sure, the boot shell should be bash in Arch Linux. It's best not to touch that at all. If you are on BSD chances are it will either be ksh or zsh altought bash can be used.

  • @dr.mikeybee
    @dr.mikeybee 4 ปีที่แล้ว

    Good info. My Ubuntu 18 is linked to dash. I don't know if that's standard of zsh did that.

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

    How he edit the terminal input like in vim??

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

      Press Ctrl+X+E and it will open your editor. If it's not Vim - it's usually nano - add export EDITOR=/usr/bin/vim (or whatever your vim path is) to your .bashrc file

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

    I follow your videos always with great interest and I got never dissapointed. But this piece of knowledge you share in this video is pure gold, hands down. You, sir, really know your business. Thank you so much for sharing! (despite so many ever-appearing fools in the comments :facepalm:)

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

    Nobody:
    Luke Smith: Don't get it twisted...

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

    Green screen library?

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

    What are you guys thinking about the Olimex Teres 1 Laptop?

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

    Does anyone know the origin of the thumbnail?

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

    I ran ls-l /bin/sh on my Ubuntu I run on my machine, and yes, Ubuntu comes with dash by default.

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

    How much does it matter if I am simply calning, for instance a python program from bash vs dash?

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

      Not much, only some initialisation overhead.

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

    can you post some benchmarks from popular shells like bash fish zsh and others?

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

    why is he recording a video in a library?

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

    So when is it appropriate to use the dot "sh" suffix?

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

      Filenames don't ever really matter, only what you mark it as on the first line. I nearly never had extentions to my scripts.

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

      any time you want, .sh is just shell script... to a windows person ;)
      #!/bin/sh or #!/bin/bash is the key...

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

    *shuffles cards*... bash is bloated

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

    Sir, are your scripts such as tools/shortcuts available for download and use?

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

    dash is also the default for scripts in pop os

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

    For the last couple of weeks shellcheck has been receiving an update a few times a day, every day. Don't know what they change internally, but every time I run pacman -Syu there's a new version of shellcheck.

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

      It's just to make me happy. I love installing updates. It feels good.

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

    What about zsh-isms?

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

    bash [[ ]] is better than test([ ]) since it doesn't spawn new process and most probably is faster

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

    Do you have a .fontconfig file for your web browser font not being monospaced

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

    At this point what's not bloat?

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

      Computers are bloat

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

    What about using python or Go as your scripting language?

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

      In a command language, everything is assumed to be a literal string unless some special characters indicate otherwise. In a programming language (in which I include Python, Go etc), everything is an expression or statement unless you use special quotes to indicate literal strings.
      The latter is a pain in a command language. That’s why they’re not designed that way. And that’s why programming languages tend not to be good as command languages.

  • @JanKowalski-se7tn
    @JanKowalski-se7tn 5 ปีที่แล้ว +1

    Why is your computer named "core" ?

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

    on ubuntu its also dash

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

    Why did you stopped using fish?

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

      I never used fish.

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

      @@LukeSmithxyz I thought you did at some point. I watched a few videos on your channel talking about fish, but I guess it was just a review.

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

    I'm an absolute newbie so please don't crucify me for asking this BUT mac terminal is based on BSD or bash?
    I'm kinda sure they are not even related, so if you can explain it to me or there are some links to read to understand more about these kinda things, please go ahead!