Тёмный

Python or Bash for scripting? Which is best? 

Mashed
Подписаться 7 тыс.
Просмотров 4,4 тыс.
50% 1

suckless repo: github.com/Edesem/Suckless
Python and Bash: 00:00
Advantages of Bash: 1:45
Disadvantages of Bash: 2:35
What Bash is good for: 4:32
Advantages of Python: 5:20
Disadvantages of Python: 7:10
When should you use either?: 8:14

Наука

Опубликовано:

 

10 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 22   
@CurrentElectrical
@CurrentElectrical 17 дней назад
You may never use it again (you first program), but it did two things- 1. it taught me how useful it can be- long term (30+ years!) and it was an excellent learning experience for you. Keep up the fantastic vids. Thank you! As a request/ suggestion for comparison between bash and python: why not write the equivalent of the first program in bash you wrote in python? Maybe even do a live so we can all learn along with you teaching us? Now that would be awesome!
@JohnnieWalkerGreen
@JohnnieWalkerGreen Месяц назад
I wish there were an easy way to utilize bash functions inside awk. But bash is only for anything less than 25 lines/25 minutes.
@johanngambolputty5351
@johanngambolputty5351 Год назад
I've been using python in place of some bash scripts lately (for bspwm/rofi scripts). It is nice being able to go back and be able to read things... For instance for your feh/dmenu example you could: ``` from subprocess import getoutput as go WALLPATH="~/pictures/wallpapers" wallpaper = go(f"ls {WALLPATH} | dmenu -i -l 50") if wallpaper != "": go(f"feh --bg-fill {WALLPATH}/{wallpaper}") ```
@rodrigoreoni5243
@rodrigoreoni5243 10 месяцев назад
Piping from ls isn't safe, but nice to know that using subprocess is a viable option to chaining commands
@ULTRA5364
@ULTRA5364 7 месяцев назад
Good job!
@yoga9869
@yoga9869 24 дня назад
aku mulai tertarik disaat python lebih fleksible namun aku sering terkendala environment dan modul disaat saya menggunakan mesin lainnya
@samarnagar9699
@samarnagar9699 7 месяцев назад
i made an bash script to run the last saved file and choose the compiler or interpeter based on files language and it gave me strokes like bash syntax is hell
@p99chan99
@p99chan99 Месяц назад
Most Linux tools such as the GNU Core utils (e.g: mkdir, cat) are written in C, having the benefits of it being fast and also portable is honestly pretty nice. C isn't too hard to learn either, although it'll depend on the complexity of the application you're writing.
@LeoNux-um7tg
@LeoNux-um7tg 2 дня назад
how about powershell?
@NiceMicroTV
@NiceMicroTV 6 месяцев назад
Writing anything in Bash is a nice exercise, but I'd say it only makes sense if you're really rely on calling programs. Bash is a shell, Bash scripting is for shell scripting, so, you put together stuff in it that you'd be doing in your shell anyways. Like, I do my backups with a Bash script that calls rsync with a specific set of parameters and then rotates old backups using mv and rm. If you need to have many variables (especially arrays, holy cow), and adding together numbers and operations like that, then you go with something else, than shell scripting.
@fstoplive1991
@fstoplive1991 9 месяцев назад
👍Love your video Young Jeti🙏 🤣 You find Python counter intuitive? I need your dictionary, please. I'm not a coder, just a writer learning from you for fun. I thought Python was for web design? But I know nothing of computer script writing. Teach us bash scripting, please.
@nicholas_obert
@nicholas_obert 6 месяцев назад
How about a Python module that implements bash commands? I was thinking of creating one just for fun, but that might actually be useful to other Linux/MacOS users. And maybe implement a batch backed for windows users.
@m4rcolongo
@m4rcolongo 5 месяцев назад
do you even ansible
@jerry27syd
@jerry27syd 5 месяцев назад
Definitionly Bash, as it is widely available on all Unix-like systems, not everyone has a full control of your environments.
@barry5
@barry5 Год назад
clearly, the best scripting language is vbscript for internet explorer
@nexttoken
@nexttoken 7 месяцев назад
Mercy. I never understood what a trigger word was until i read this comment.
@samarnagar9699
@samarnagar9699 7 месяцев назад
oh a fello nvchad enjoyer
@R3DC0DE
@R3DC0DE Год назад
Just coming here to say Lua
@MashedLinux
@MashedLinux Год назад
Never tried it!
@qaq_tw5200
@qaq_tw5200 Год назад
​@@MashedLinux same, but still I use neovim (AstronNvim) without learning lua😏
@codedsprit
@codedsprit Год назад
Ohh ! Obviously bash script.
@esfo2824
@esfo2824 4 месяца назад
rust best for scripting
Далее
Why is Python so Slow?
10:44
Просмотров 535 тыс.
this BASH script will KILL you.
29:43
Просмотров 270 тыс.
🎙ПЕСНИ ВЖИВУЮ от КВАШЕНОЙ🌹
3:09:38
you need to learn BASH Scripting RIGHT NOW!! // EP 1
12:14
Monty Python Communist Quiz sketch
3:18
Просмотров 18 млн
tRPC, gRPC, GraphQL or REST: when to use what?
10:46
Просмотров 72 тыс.
Terminal vs. Bash vs. Command line vs. Prompt
11:06
Просмотров 231 тыс.
Python Sockets Explained in 10 Minutes
9:32
Просмотров 7 тыс.
If __name__ == "__main__" for Python Developers
8:47
Просмотров 385 тыс.
Why I Switched Back to Bash, And Why You Should Too
10:42
Собери ПК и Получи 10,000₽
1:00
Просмотров 2,3 млн