Shell Scripting: how to make an executable script (and about arguments)

Поделиться
HTML-код
  • Опубликовано: 22 авг 2024
  • Once again, the only way to learn the shell is through examples.
    Also, I "fixed" the aspect ratio.
  • НаукаНаука

Комментарии • 5

  • @annoyingmime3081
    @annoyingmime3081 5 лет назад +2

    I think breaking down a more complex shell script piece by piece would cover a ton of material in one video, like how you explained the bookmarks script in the first tutorial.

    • @RudyHill
      @RudyHill  5 лет назад

      Thanks for the feedback. I completely agree.

  • @PatRose
    @PatRose 5 лет назад +3

    this is literally what i learn in school rn

  • @manuellopez1234
    @manuellopez1234 5 лет назад +1

    Do you know why this works? Just changin that mode bit makes it into an executable while order programs you need the binaries? My guess is since we are using the terminal that work in shell is like an interpreter like when using the python interpreter.

    • @RudyHill
      @RudyHill  5 лет назад +1

      You're right on the money Ale. In this video I specify to the terminal to use the POSIX compliant shell to interpret the script. I could have used "#!/bin/bash" to tell the terminal to use GNU bash for example (you can use this same principle for python scripts too). But I'm sure if you tried this with C source code it wouldn't work.