Should I learn bash scripting or is it going obsolete?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Should I learn bash scripting or is it going obsolete?
# 8  
Old 10-30-2010
Quote:
Originally Posted by Corona688
This question is almost too good: "Hm... I could go to unix.com and ask whether a fundamental underpinning of UNIX systems is obsolete and should give forth before the windows brigade... Eh, a bit too obvious. I know -- ask that about an unusual shell, one that divides the community, in a manner that suggests I believe it's all shell scripting! The nerd rage will be hysterical!"

I'll be generous and assume you're not trolling. Is BASH obsolete? No. Is it for the things you use C# or Python for? Also no.

Scripting is somewhere between difficult and useless on a Windows machine because there are so many unscriptables(awkward, undocumented, or impossible). A program as simple as "cdrecord -dao cd_image.iso && /sbin/poweroff" (i.e. burn a cd, then turn off the computer) in UNIX might, in Windows, need an entire development environment, plus peering into undocumented OLE hell to figure out how (if at all!) your favorite CD burning program tells the computer whether burning completed successfully. Ever had to type in the same thing, or closely related things, 37 seperate times? Ever had to repetitively copy/paste data from one program into another because you can't just tell one to read from the other? Ever had to sit and wait for the computer to finish just so you can tell it to do something you wanted it to do all along? That's the kind of automatic tasks shell scripting and pipes are for. They join entire programs together at a very high level, if they're equipped to communicate that way; most UNIX programs are, most Windows ones aren't.

You should learn shell scripting, not just "bash scripting". BASH is just one shell. Learn how to program in a general Bourne shell and you can program in BASH, SH, and KSH the same way, and know what features BASH has and SH doesn't.
wait so you cant use python within linux to substitute shell scripting? i wasnt referring to windows at all...
# 9  
Old 10-31-2010
Quote:
Originally Posted by KalEl
wait so you cant use python within linux to substitute shell scripting?
Python is not a shell, no.

You can use pipes in Python, much the same way you use pipes in C -- doing everything yourself, creating processes and creating pipes and redirecting file descriptors explicitly all the time, step by painful step.

Python has instead become a twelve-ton all-singing all-dancing do-everything language with every possible feature nailed to the side so you theoretically don't need an efficient way to use anything outside Python, with the side-effect that it opens hundreds of files to do nothing at all, much like Perl, Java, and .Net have done. It even has expansion modules to just call a proper UNIX shell.

Last edited by Corona688; 10-31-2010 at 02:42 PM..
# 10  
Old 10-31-2010
Quote:
Originally Posted by Corona688
Is it capable of interacting with a program that doesn't have the special hooks to do so?
yes, of course.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to learn UNIX shell scripting?

Hi Guys, I know basic command of unix and basic programming of unix as like using for loop, while loop, if..else, case statement etc. then how to learn unix shell scripting as well as use also. (1 Reply)
Discussion started by: aaditya321
1 Replies

2. UNIX for Dummies Questions & Answers

Learn bash shell scripting

I do not know shell scripting. But at work place, I have got an in and out shell scripting task. I just need to understand a very big script. Is there any tool in which I can place the script and it can tell me the meaning of the whole script? (3 Replies)
Discussion started by: lg123
3 Replies

3. Shell Programming and Scripting

Books to learn UNIX Scripting from Scratch

Hi All, I am quite new to UNIX Scripting and want to learn it from scratch, a book which gives lot of examples, how to troubleshoot, how to run etc.. would be great. Need help from all the experts out there to suggest one book to start with. Regards, Vikas (4 Replies)
Discussion started by: vikas_chengdu
4 Replies

4. Shell Programming and Scripting

LEARN SHELL SCRIPTING BASICS

I am beginner to the SHELL SCRIPT and want to Learn SHELL SCRIPT Basics. This thread should help to all beginners who want to learn SHELL SCRIPT *** Thanks in advance to those who will contribute on this thread *** Please guide me and all beginners... 1. Is there any good e-book... (3 Replies)
Discussion started by: sagarsbhandare
3 Replies

5. Shell Programming and Scripting

My PM has told me to learn shell scripting in 2 weeks , how should I start?

My PM has told me to learn shell scrting in 2 weeks , how should I start?:confused::confused::confused::confused: (1 Reply)
Discussion started by: manalisharmabe
1 Replies

6. Shell Programming and Scripting

Any book to learn perl scripting

Hi, Please suggest me any good book to learn pearl scripting. Thanks in advance !!!!:) (5 Replies)
Discussion started by: vkvishwakarma6
5 Replies

7. Gentoo

cpu%/mem% usage, scripting, dzen2: howto learn bash the hard way

I am trying to write a small (and rather simple) script to gather some info about the system and piping it to dzen2 first, i want to explain some things. I know i could have used conky, but my intention was to expand my knowledge of bash, pipes and redirections inside a script, and to have fun... (14 Replies)
Discussion started by: broli
14 Replies

8. Shell Programming and Scripting

Help- To learn shell scripting

Hello all, Could any one let me know where to find exercises(problems to solve) both simple and complex ones that would eventually help me learn Shell scripting.I'm just a beginner:o in shell scripting but would love to learn more.. Thanks, Triji (2 Replies)
Discussion started by: tj23
2 Replies

9. UNIX for Dummies Questions & Answers

Programming/Scripting Languages To Learn

Which languages would, in the long run, be best to learn on a UNIX environment for kernel work, every day programs, and overall UNIX programming? I've been learning C for over a year now (which I'm pretty confident with) and decided I want to look into some other languages. I'll mainly be... (1 Reply)
Discussion started by: tjinr
1 Replies

10. Shell Programming and Scripting

What is a good place to learn basic shell scripting? Thanks!

See the title. Originally wasn't going to type anything but I need a message of at least 10 characters! :cool: (2 Replies)
Discussion started by: deutchap6verse5
2 Replies
Login or Register to Ask a Question