How to put Bash Scripts on the Web

  Рет қаралды 6,197

Mark McNally

Mark McNally

Күн бұрын

Пікірлер: 34
@qball8up1968
@qball8up1968 Жыл бұрын
This video makes the minimalist geek in me very happy. Great video Mark.
@MarkMcNallyJE
@MarkMcNallyJE Жыл бұрын
Haha thank you!
@0utl4nder
@0utl4nder Жыл бұрын
This is crazy, 4 days ago i made a bash script for Directory indexing, and now YT recommended this vid, with htmx feels like React or something like that . Nice video
@echobucket
@echobucket Жыл бұрын
Also to make it refresh REALLY without JS, you just add a to your head tag.
@MarkMcNallyJE
@MarkMcNallyJE Жыл бұрын
Yeah I just wanted to show of HTMX because it blew my mind with how nice it was to use :)
@Anonymouzee
@Anonymouzee Жыл бұрын
I was just going to suggest this one... ;-)
@derekstevens164
@derekstevens164 Жыл бұрын
Very cool video. I had to go into apache settings for arch: /etc/httpd/conf/httpd.conf and uncomment several cgi options for the code to work; otherwise it would just echo the shell command. Also had to use hx-swap="appendChild" instead.
@echobucket
@echobucket Жыл бұрын
The blank line is because in HTTP an empty line denotes the end of the HTTP Headers and the beginning of the HTTP Body
@MarkMcNallyJE
@MarkMcNallyJE Жыл бұрын
Thanks!
@user-ui8my9zs7o
@user-ui8my9zs7o Жыл бұрын
Id really like to know how far you can take this. For a db you could use something like recutils.
@MarkMcNallyJE
@MarkMcNallyJE Жыл бұрын
Yes that would be interesting! I made a video on recutils so you could use that ;) Also if you wanted to go full send you could probably quite easily use something like MySQL or SQLite for a proper backend :)
@user-ui8my9zs7o
@user-ui8my9zs7o Жыл бұрын
@@MarkMcNallyJE yeah! I just love the idea of easily writing an entry with a text editor! Makes things more fun.
@user-ui8my9zs7o
@user-ui8my9zs7o Жыл бұрын
Would be good for a simple testing db. Plus you can export it to a csv and import that into SQL
@MarkMcNallyJE
@MarkMcNallyJE Жыл бұрын
If you make something cool let me know - I would love to see it!
@Crftbt
@Crftbt 6 ай бұрын
Curious which floating window manager / desktop environment that is. :)
@MarkMcNallyJE
@MarkMcNallyJE 6 ай бұрын
it's completely default i3 :)
@5calv576
@5calv576 5 ай бұрын
can we also do this with nginx?
@santocyriac1458
@santocyriac1458 5 ай бұрын
This could come in handy for my project
@Garock2
@Garock2 2 ай бұрын
This is chad content
@Descent098
@Descent098 3 ай бұрын
The blank line is an HTTP thing, the blank line indicates the end of your headers and the beginning of the content. Without it your browser is expecting your HTML to be more headers. It's gotten me every time I try to do anything with HTTP.
@soufta5872
@soufta5872 2 ай бұрын
Wait wait, I was just focussing back on bash (as this is the very first language you encounter when connecting to a linux server) and I found your vid. Cool but does this language scale ? I assume that you could everything with that language but up to which level ? Thanks
@Badis-n2u
@Badis-n2u 6 ай бұрын
The way i used this was by creating bash scripts that use imagemagik for image manipulation and then calling them through express js apis routes
@channelmalta
@channelmalta Жыл бұрын
Wouldnt bash behaves like any other scripting language? Bash here is not running on the browser but on the server, basically, it's how PHP works.
@MarkMcNallyJE
@MarkMcNallyJE Жыл бұрын
Yes that is true, the bash script is running on the server not in the browser like javascript would. But with the cgi you can take existing languages that you know (like bash!) and allow users to run them from a web browser so it's effectively the same thing ;)
@Brigadurr88
@Brigadurr88 Жыл бұрын
Can you use this to run Discord without crashing ?
@MarkMcNallyJE
@MarkMcNallyJE Жыл бұрын
Maybe with a monumental amount of effort.
@derickasamani5730
@derickasamani5730 Жыл бұрын
Thank you
@JSSMVCJR2.1
@JSSMVCJR2.1 Жыл бұрын
If it ia the JavaScript Revolution, wouln't make you a counterrevolutionary? A reactionary?
@MarkMcNallyJE
@MarkMcNallyJE Жыл бұрын
traditionalist I would say
@Anonymouzee
@Anonymouzee Жыл бұрын
🤣🤣🤣 Fight that javascriptieeeeesssss!!! 🤣🤣🤣
@MarkMcNallyJE
@MarkMcNallyJE Жыл бұрын
YEAH BUDDDDDYYYYY
@robertcooperAZ
@robertcooperAZ 6 ай бұрын
I did something similar using yad gui. yad gui has a --html switch (Dialog) that displays a webpage in its gui windowing on Linux. I created custom links to run bash commands in "child bash terminal" using the yad gui --html page with --print-uri switch. Here is that video. kzbin.info/www/bejne/nIvIl5Skos5krrM I will have to test your cgi method in a yad gui dual window "--paned" DIalog. (Thanks for sharing cgi - apache method !!!)
@Benjicmm
@Benjicmm 4 ай бұрын
I hate javascript so much it's unreal
Become a shell wizard in ~12 mins
12:25
CODE IS EVERYTHING
Рет қаралды 264 М.
Andro, ELMAN, TONI, MONA - Зари (Official Music Video)
2:50
RAAVA MUSIC
Рет қаралды 2 МЛН
Andro, ELMAN, TONI, MONA - Зари (Official Audio)
2:53
RAAVA MUSIC
Рет қаралды 8 МЛН
번쩍번쩍 거리는 입
0:32
승비니 Seungbini
Рет қаралды 182 МЛН
The Magic of cgi-bin
23:10
Philip Bohun
Рет қаралды 13 М.
Coding a Web Server in 25 Lines - Computerphile
17:49
Computerphile
Рет қаралды 354 М.
Introduction to Advanced Bash Usage - James Pannacciulli @ OSCON 2014
42:53
James Pannacciulli
Рет қаралды 133 М.
Web Server Concepts and Examples
19:40
WebConcepts
Рет қаралды 267 М.
Learning Awk Is Essential For Linux Users
20:02
DistroTube
Рет қаралды 310 М.
The HTML Tags They NEVER Taught You
7:39
Giodev
Рет қаралды 155 М.
Become a bash scripting pro - full course
36:00
CODE IS EVERYTHING
Рет қаралды 74 М.
you need to learn BASH Scripting RIGHT NOW!! // EP 1
12:14
NetworkChuck
Рет қаралды 1 МЛН
Making Minecraft from scratch in 48 hours (NO GAME ENGINE)
16:38
I tried React and it Ruined My Life
1:19:10
Tsoding Daily
Рет қаралды 157 М.
Andro, ELMAN, TONI, MONA - Зари (Official Music Video)
2:50
RAAVA MUSIC
Рет қаралды 2 МЛН