LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 07-09-2012, 06:00 AM   #16
pan64
Senior Member
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 2,748

Rep: Reputation: 619Reputation: 619Reputation: 619Reputation: 619Reputation: 619Reputation: 619

I think most of the basic and admin scripts of a linux are written in shell, so if you want to manage a linux box you must know bash. If you have a special environment already available you would need to learn the language used by that system (for example gnome applets are partially implemented in python).
 
Old 07-09-2012, 08:19 AM   #17
sundialsvcs
Senior Member
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 4,551

Rep: Reputation: 640Reputation: 640Reputation: 640Reputation: 640Reputation: 640Reputation: 640
Actually, I think that you will find that high-level languages (Ruby, Perl, Python, even PHP sometimes) are used quite commonly for these tasks ... because the scripting language in Bash is really not designed to be a programming language. Nor does it need to be. Thanks to #!shebang, you can write a command in any language you please, and no one will know or care. Choosing what is "the best all around tool to use for this job" is a fundamental first-decision. You have "an embarrassment of riches" to choose from. There are no brownie-points to be earned for going a hundred miles on a pogo stick instead of taking the freeway ... even if you "succeed."
 
Old 07-14-2012, 08:38 AM   #18
Mercury305
Member
 
Registered: Jul 2012
Location: Rockville, MD
Distribution: Slackware & Fedora
Posts: 478

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by sundialsvcs View Post
Actually, I think that you will find that high-level languages (Ruby, Perl, Python, even PHP sometimes) are used quite commonly for these tasks ... because the scripting language in Bash is really not designed to be a programming language. Nor does it need to be. Thanks to #!shebang, you can write a command in any language you please, and no one will know or care. Choosing what is "the best all around tool to use for this job" is a fundamental first-decision. You have "an embarrassment of riches" to choose from. There are no brownie-points to be earned for going a hundred miles on a pogo stick instead of taking the freeway ... even if you "succeed."
great advice thanks python it is...
 
Old 07-16-2012, 02:37 AM   #19
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: FreeBSD, Debian, Mint, Puppy
Posts: 3,211

Rep: Reputation: 155Reputation: 155
It's not really a sensible question.

Q: "what is better, a screwdriver or a hammer?"

A: It depends on the job.



bash is rubbish for scripting anyway, use mksh

;-)
 
2 members found this post helpful.
Old 07-16-2012, 10:33 AM   #20
Mercury305
Member
 
Registered: Jul 2012
Location: Rockville, MD
Distribution: Slackware & Fedora
Posts: 478

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by bigearsbilly View Post
It's not really a sensible question.

Q: "what is better, a screwdriver or a hammer?"

A: It depends on the job.



bash is rubbish for scripting anyway, use mksh

;-)
You gave the best answer of all... Always comes from the FreeBSD guys. Maybe I should switch my OS LOL. The ZFS is very tempting. The only thing that worries me is my hardware maybe I should set up a VM and chek it out. Also I like command line. Thats why I use Slackware and FreeBSD is also command line power user friendly. (Yes I know off topic). But yea just like you said "screw driver and hammer". I just wished to see more "FreeBSD jobs" as opposed to "redhat" everywhere.
 
Old 07-16-2012, 10:49 AM   #21
tangle
Senior Member
 
Registered: Apr 2002
Location: Holmesville, Ohio
Distribution: Slackware
Posts: 1,731

Rep: Reputation: 64
You should should learn both. Python is an easy language to learn and teaches you OOP that you will not get with BASH.
 
Old 07-16-2012, 10:57 AM   #22
Mercury305
Member
 
Registered: Jul 2012
Location: Rockville, MD
Distribution: Slackware & Fedora
Posts: 478

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by tangle View Post
You should should learn both. Python is an easy language to learn and teaches you OOP that you will not get with BASH.
Yea, I am thinking some Basic Bash then Python.
 
Old 07-17-2012, 02:32 AM   #23
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: FreeBSD, Debian, Mint, Puppy
Posts: 3,211

Rep: Reputation: 155Reputation: 155
Quote:
Originally Posted by Mercury305 View Post
I just wished to see more "FreeBSD jobs" as opposed to "redhat" everywhere.
Tell me about it! Redhat microsoft wannabees.


It's a shame because unix is all fragmented again like in the bad old days.
 
Old 07-17-2012, 09:38 AM   #24
sundialsvcs
Senior Member
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 4,551

Rep: Reputation: 640Reputation: 640Reputation: 640Reputation: 640Reputation: 640Reputation: 640
There's no "Red Hat vs. BSD vs. (anything_at_all)" actually going on here.

The bottom line is that Unix/Linux gives you "an embarrassment of riches" with regards to the programming power-tools that you can use. Therefore, on-the-job you can fully expect to find many of these languages simultaneously in use. I happen to be a student of programming languages anyhow, and it has served me well. (For example, when presented with a massive logic-problem as part of being first-to-find on a Terracaching (GPS treasure-hunt) puzzle, I whipped up a GNU Prolog program to solve it. Sudoku problems are a snap.)

Now, you don't have to be a "walking expert" on everything, and you really can't be. But what you certainly can and should do is to make it your business to familiarize yourself with all of the contents of your system's (very extensive) tool chest. Know what's installed. Make it your business to have picked-up the tool, hefted it in your hands a few times to feel its weight, and to have located and perused the associated web sites. Eventually, you're going to run into a script in "a strange language," but it's not so strange... come to think of it, you've seen it before. You're going to encounter some problem, and it's going to remind you of something.

Last edited by sundialsvcs; 07-17-2012 at 09:39 AM.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Bash from python ! noony123 Programming 9 03-17-2011 09:59 PM
[SOLVED] Python Installed; bash command: python base.py. gets syntax error in base.py cre84j Linux - Software 4 01-23-2011 04:46 PM
Python or BASH dudeman41465 Programming 2 11-29-2010 12:01 PM
python to bash translation triadic Programming 1 10-18-2010 05:52 AM
Python: bash-shell-like less functionality in the python shell narnie Programming 4 06-29-2010 12:25 PM


All times are GMT -5. The time now is 05:25 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration