Bash vs Python


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Bash vs Python
# 1  
Old 05-01-2002
Bash vs Python

Python is obviously better than expect for many reasons such as efficieny, opsys availabiliy, functions etc), but can anybody tell me how it is better structurally.

I.e. If automating a procedure such as 'Autoftp' login why is Python better than Bash? Yes it uses only one file, istead of the two files which would have been used by bash and expect, but why is it better overall for such procedures?

The Bish has spoken
# 2  
Old 05-02-2002
This looks more like a Assignement Question. Pls refer the forum rules.
# 3  
Old 05-02-2002
Not a homework Question

This question actually isnt a homework Question. But can anybody shed any light on the matter.
# 4  
Old 05-02-2002
My only question is: If Python is the better tool then why wonder how it is better...

If you really need to know try using www.google.com to find comparisons between the two. Or look in a Python progamming book. It may tell you just to be braggadocios!!

Smilie
# 5  
Old 05-03-2002
No comparrison

There is currently no comparrison for Bash and Python!!! Will post my report on my web site in a few days.Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Pass bash variable to python

How can I pass bash Variable to python script. bash.sh while read -r db do Printf "%s\n" ${db} "Found" done < path/to/file.txt file.txt db1 db2 db3 python.py print(${db}_tables.replicate.fix) (2 Replies)
Discussion started by: lpoolfc
2 Replies

2. Shell Programming and Scripting

How to enable rh-python34 from bash shell script, default python is 2.6 version.?

On our server default python version is 2.6, how to enable rh-python34 via bash shell. Thanks a lot for the helpful info. (7 Replies)
Discussion started by: cplusplus1
7 Replies

3. Shell Programming and Scripting

How to use scl enable python command call with in bash shell script?

I have a bash shell script, within it i am using the below two commands . its failing right on scl enable command itself. if i run it by itself without a shell, it works fine. by default it is using pythin version 2.6 something. i want to use 3.4 version for that reason with in the shell... (3 Replies)
Discussion started by: cplusplus1
3 Replies

4. Shell Programming and Scripting

Beginner here, how to call a bash-script from python properly?

Hi everyone, i have the following script.sh: foo='lsusb | grep Webcam | cut -c16-18' sudo /home/user/public/usbreset /dev/bus/usb/001/$foo when i try to call this script from python using subprocess.call("script.sh", shell=True) it seems that only 'sudo /home/user/public/usbreset' is being... (6 Replies)
Discussion started by: hilfemir
6 Replies

5. Shell Programming and Scripting

Display-performance in terminal, bash or python?

Heyas I've been working on my project TUI (Text User Interface) for quite some time now, its a hobby project, so nothing i sit in front of 8hrs/day. Since the only 'real' programming language i knw is Visual Basic, based upon early steps with MS-Batch files. When i 'joined' linux 3 years ago,... (7 Replies)
Discussion started by: sea
7 Replies

6. Shell Programming and Scripting

Bash script with python slicing on multiple data files

I have 2 files generated in linux that has common output and were produced across multiple hosts with the same setup/configs. These files do some simple reporting on resource allocation and user sessions. So, essentially, say, 10 hosts, with the same (2) system reporting in the files, so a... (0 Replies)
Discussion started by: jdubbz
0 Replies

7. Shell Programming and Scripting

[Solved] Unable to call a python script from bash

Hi, I am trying to run a python script embedded in bash script. But is throwing me an error. Please help. Script: #!/bin/bash nohup /usr/bin/python /opt/web/http.py & Error: /usr/bin/python: can't open file '/opt/web/http.py': No such file or directory Please help me on this. (6 Replies)
Discussion started by: maddy26615
6 Replies

8. Shell Programming and Scripting

Python call to bash script returns empty string

Hi all, I need help figuring out why my script won't work when envoked from web interface. First off, I'm fairly new to Linux and Shell scripting so, my apologies for being ignorant! So I have a python script that I envoke through a web interface. This script envokes my shell script and... (8 Replies)
Discussion started by: arod291
8 Replies

9. Programming

Python: bash-shell-like less functionality in the python shell

Hello, Is there some type of functional way to read things in the Python shell interpreter similar to less or more in the bash (and other) command line shells? Example: >>> import subprocess >>> help(subprocess) ... ... I'm hoping so as I hate scrolling and love how less works with... (0 Replies)
Discussion started by: Narnie
0 Replies

10. Shell Programming and Scripting

python vs bash - verbose mode

hey all! i'm looking how to render verbose python scripts. what i'm looking for would be an equivalent to a "bash -xf" in bash script headers.. Any help? (2 Replies)
Discussion started by: penguin-friend
2 Replies
Login or Register to Ask a Question