Bash scripts for web apps

Joined
Jan 16, 2023
Messages
1
Reaction score
0
Hello guys. Im new here, first post.

I am a Linux user for the past couple of years, and just getting into some basic bash scripting.
My coding skills are very basic, and bash is the first skill i am learning and playing with.
I understand it is not an actual "programming language" but a tool to automate admin tasks, manipulate files and such.
So far i am able to write very basic programs with it, using variables, loops, user input, functions and recycling parts of scripts i find online for different learning purposes.

I have been developing websites for long time with WYSIWYG tools and wordpress, but never learned coding like javascript, PHP, python, although I am able to modify sections of code by trial and error, with my limited programming understanding.

Today I am trying to integrate a little bash script I made into a web page. The script takes user input (text), processes it and echoes the desired result.
I am looking online and found a little tutorial to execute a bash script and print the output in html using some PHP and shell_exec.
I couldn't find anything on passing the user input from an HTML form to the actual bash script for processing and spit the result back to the page. In this case, I am trying to adapt the little bash program I previously mentioned into a web page.

So my newbie questions here..
Is it possible to use bash to make web applications or is it very limited to only output whatever the script makes on the server when its executed?
Is it actually safe?
And then, since I am starting to get the basics in a form of programming language, what else should I start learning with the intention to develop some
web applications?
I understand some basic SQL commands, managing databases, and would like to start learning some basic web app development.
Open for suggestions and ideas.
Thank you guys
 
Joined
Jan 30, 2023
Messages
107
Reaction score
13
Yes, it is possible to use bash to make web applications, but it is limited in terms of functionality and security compared to modern web development technologies.

Regarding safety, executing arbitrary shell scripts on a server can pose security risks, especially if the input is not properly validated.

If you are looking to develop web applications, it is recommended to learn a more robust web development technology, such as PHP, Python, or JavaScript. These languages offer more robust libraries and tools for building web applications and are generally easier to secure than shell scripts. Additionally, learning a more widely used language will give you more job opportunities and resources for developing your skills.

Regarding databases, learning SQL is a good start, but you should also learn a web framework that has built-in support for databases such as Django (Python), Laravel (PHP), or Ruby on Rails.

So to summarize, consider learning a more robust web development technology, a web framework, and improve your SQL skills to develop web applications securely and efficiently.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top