Results 1 to 4 of 4
I've been thinking a few weeks on the possibility of creating things with shell scripting, such as graphing software for mathematics. I looked at a TI calculator, and noticed how ...
- 02-02-2008 #1
Call me crazy, but is it possible to create decent programs with shell scripting?
I've been thinking a few weeks on the possibility of creating things with shell scripting, such as graphing software for mathematics. I looked at a TI calculator, and noticed how it's somewhat pixelated. I figured that if there were enough skill in shell scripting, a program could be made with shell scripting to actually plot and graph something such as y=2x+3
My idea was to have a color echoed to the be a background.
Afterwards, there would be a user-input area.
From there, characters (such as dots or other ascii characters/shapes) would be placed where there had been echoed colors. The better idea was to simply use a white background and have the white areas turn black. And the font size would have to be very, very small.
Do you see where I'm going with this?
I'm thinking font size and the screen dimensions would have to be compensated for, but that could be done by user input and saved to a file, which could be set to default.
So, have any of you thought about the reality of this?
My view is that something of the such would be highly portable, and you wouldn't need to install a compiler or other whenever you walk to a linux distro without one.
If gives me an idea for a new Linux distro called Terminal Linux. I guess that might be a good name. And it would simply be an OS with tons of BASH scripting like programs. For instance, if a bash script could interpret html code from a website, you could make a BASH web browser.
I know it seems unrealistic, but what about creating a light CAD system with BASH scripting?
Now, that would be insane, but it would go off the principles of the graphing system.
And the files could be ported to some standard...
My view is the idea of portability, true portability.
I suspect an analysis of the various shells would be in order, and then the programs would have to be compensated as such, but I don't think there would be too much of a problem.
- 02-03-2008 #2
You claim that the reason for this is "true portability". But of course, it is not true portability. It simply runs on any system that has Bash. Just like an x86 ELF binary runs on any system that supports x86 ELFs, and a C program can be compiled by any compiler that supports the same standard.
What is my point? There is no such thing as "true portability".
With this in mind, I don't really understand why you would want to do this. Shell scripting is extraordinarily difficult to do many operations in, not to mention the extreme inefficiency of it. And for instance, lynx is a text-based web browser that runs in a terminal. Since it is already available, what is gained by having a Bash-based web browser? Binaries are certainly equally (if not more) portable than a Bash script, since any system that can run Bash can run a binary.DISTRO=Arch
Registered Linux User #388732
- 02-03-2008 #3Linux Engineer
- Join Date
- Apr 2006
- Location
- Saint Paul, MN, USA / CentOS, Debian, Solaris, SuSE
- Posts
- 1,117
Hi.
You may wish to peruse PPT: Unix Reconstruction Project. I have used some code from there. They provide sections why, how, who, among others ... cheers, drlWelcome - get the most out of the forum by reading forum basics and guidelines: click here.
90% of questions can be answered by using man pages, Quick Search, Advanced Search, Google search, Wikipedia.
We look forward to helping you with the challenge of the other 10%.
( Mn, 2.6.n, AMD-64 3000+, ASUS A8V Deluxe, 1 GB, SATA + IDE, Matrox G400 AGP )
- 02-03-2008 #4Linux Engineer
- Join Date
- Feb 2005
- Posts
- 1,044
As Cabhan points out, you need to choose your language based on your needs, and find the most suitable for the circumstances. It's perfectly possible to write decent programs in a shell script, as it is in any language, and it's equally possible to write appallingly bad programs (and operating systems!) in any language.


Reply With Quote