Faculty of Engineering and Mathematical Sciences 
Not logged in (login)


This forum is provided to promote discussion amongst students enrolled in Open Source Tools and Scripting (CITS4407).
RSS cloud
Jump to:

Bash vs Other Programming Languages (eg Python or C)

1 of 390 articles shown, currently no other people reading this forum.
From: David M.
Date: Sun 7th Jun, 7:05pm


The assignments require you to demonstrate what you CAN do with bash
not what you SHOULD do with bash. 

You would never use bash to write a significant program. 

Bash and other shells are primarily to help a user interact with the 
operating system. This includes automating tasks; and most usefully, 
shell scripts act as the "glue" between applications that perform
specialised tasks.

E.g. in Assignment 2, task 3, the most time consuming task, by far, was reading
the data files into memory.  And since the application seems to be intended
originally to run in a Web page, response time is critical and therefore it would be
a very poor design decision to read the files into memory every time you want to
compute a route. I.e. you would want to store the data in a database.  Accessing
The database and performing computations would be much more conveniently
done using a full-featured programming language. (I note you could use a SQL
command-line tool in your shell script if you are mad enough!) Also do not forget
that modern programming languages have many nice features to help you,
e.g. proper functions amongst others, as well as modules or libraries.

For serious Unix scripting, you should consider Perl (it is not dead - merely
unfashionable), otherwise Python or Ruby on Rails for Web stuff, or Javascript
and Node.js.

Related articles

Bash vs Other Programming Languages (eg Python or C) (all 4) RSS
├─ original   Sun 7th Jun, 11:20am, Kerrie B.
├─ reply 1   Sun 7th Jun, 4:00pm, Lee dB.
├─ THIS   Sun 7th Jun, 7:05pm, David M.
└─ reply 3   Tue 9th Jun, 4:50pm, Christopher M.
This Page

Program written by: [email protected]
Feedback welcome
Last modified:  3:57pm Aug 06 2020