Home > Unix > UNIX Shell Programming QuickStart UNIX Shell Programming QuickStart Eugenia Loli 2005-01-24 Unix 5 Comments So you want to start programming UNIX shells. You could sit down with a dense volume of coding advice, but you’re a techie. You want to jump right in and start coding. This chapter will help you get started right away with shell programming in UNIX. About The Author Eugenia Loli Ex-programmer, ex-editor in chief at OSNews.com, now a visual artist/filmmaker. Follow me on Twitter @EugeniaLoli 5 Comments 2005-01-25 12:20 am might as well read informit! 2005-01-25 2:30 am If your going to write anything more than a 5 line script avoid csh , bash etc.. like the plague. I have found shell scripts result in big messy hard to debug monstrosoties. Also adding extra features that users want becomes a nightmare. Your tiny trivial shell script can become a huge mess very quickly. For working on the command line bash and csh are great but for developing permanent scripting solutions use python or ruby instead:) 2005-01-25 3:31 am I agree that large shell scripts can get very messy; but some are quite clean, organized, and work very well. A lot depends on your knowledge of the shell that you use. Lately I’ve been doing more scripts using retroforth than bash, but I’m far more familiar with retroforth than with bash 2005-01-25 7:18 am If you’re writing shell scripts in (t)csh or bash you are allready looking for troubles. /bin/sh is your friend. 2005-01-25 8:17 am I like bash scripting. I can test individual commands very easily, and I learn to understand my commands a lot better. To avoid the mess I tend to organize things in functions that take arguments and that pipe their output to some channel. You can have more than the stdout and stderr, and let the user decide were it should go -> this way I split up different outputs in a single function. I have to admit that I have only used some other channel once though. Anyway, my point: I think bash shell scripting isn’t all bad… You do have to clearly comment what you do in a normal language though, because indeed, commands can get complex very quickly (which is partly why I like bash scripts).