10-30-2010
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.
Last edited by Corona688; 10-30-2010 at 04:44 PM..
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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
2. UNIX for Dummies Questions & Answers
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
3. Shell Programming and 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
4. Gentoo
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
5. Shell Programming and Scripting
Hi,
Please suggest me any good book to learn pearl scripting.
Thanks in advance !!!!:) (5 Replies)
Discussion started by: vkvishwakarma6
5 Replies
6. Shell Programming and Scripting
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
7. Shell Programming and Scripting
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
8. Shell Programming and Scripting
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
9. UNIX for Dummies Questions & Answers
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
10. Shell Programming and 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
LEARN ABOUT OPENSOLARIS
libbash
LIBBASH(7) libbash Manual LIBBASH(7)
NAME
libbash -- A bash shared libraries package.
DESCRIPTION
libbash is a package that enables bash dynamic-like shared libraries. Actually its a tool for managing bash scripts whose functions you may
want to load and use in scripts of your own.
It contains a 'dynamic loader' for the shared libraries ( ldbash(1)), a configuration tool (ldbashconfig(8)), and some libraries.
Using ldbash(1) you are able to load loadable bash libraries, such as getopts(1) and hashstash(1). A bash shared library that can be loaded
using
ldbash(1) must answer 4 requirments:
1. It must be installed in $LIBBASH_PREFIX/lib/bash (default is /usr/lib/bash).
2. It must contain a line that begins with '#EXPORT='. That line will contain (after the '=') a list of functions that the library
exports. I.e. all the function that will be usable after loading that library will be listed in that line.
3. It must contain a line that begins with '#REQUIRE='. That line will contain (after the '=') a list of bash libraries that are
required for our library. I.e. every bash library that is in use in our bash library must be listed there.
4. The library must be listed (For more information, see ldbashconfig(8)).
Basic guidelines for writing library of your own:
1. Be aware, that your library will be actually sourced. So, basically, it should contain (i.e define) only functions.
2. Try to declare all variables intended for internal use as local.
3. Global variables and functions that are intended for internal use (i.e are not defined in '#EXPORT=') should begin with:
__<library_name>_
For example, internal function myfoosort of hashstash library should be named as
__hashstash_myfoosort
This helps to avoid conflicts in global name space when using libraries that come from different vendors.
4. See html manual for full version of this guide.
AUTHORS
Hai Zaar <haizaar@haizaar.com>
Gil Ran <ril@ran4.net>
SEE ALSO
ldbash(1), ldbashconfig(8), getopts(1), hashstash(1) colors(1) messages(1) urlcoding(1) locks(1)
Linux Epoch Linux