Adding Some Spice To *nix Shell Scripts 411
An anonymous reader writes "Developing GUI script-based applications is time-consuming and expensive. Most Unix-based scripts run in a CLI mode or over a secure ssh session. The Unix shells are quite sophisticated programming languages in their own right: they are easy to design and quick to build, but they are not user-friendly in the same way the Unix commands aren't (see the Unix haters books). Both Unix and bash provide features for writing user friendly scripts using various tools to build powerful, interactive, user-friendly scripts that run under the bash shell on Linux or Unix. What tools do you use that spice up your scripts on the Linux or Unix platforms?"
Re:None, I have given up bash scripting (Score:2, Funny)
it can't handle filenames with space in them without some serious hack magic.
Use quotes
It's pricey but.... (Score:3, Funny)
One day.... one day....
Since I live in my parent's basement... (Score:3, Funny)
I use the usual: sed, [, wget, etc to automate downloads of pr0n.
3D goggles! (Score:3, Funny)
Combined with red and blue text the goggles make my facepalm ASCII art really pop!
You see, I use ASCII art in lieu of the dialog boxes for user feedback. It's more intuitive to show facepalm guy when I ask the user for a digit & they give me a letter. They understand right away that they're an idiot.
Re:None, I have given up bash scripting (Score:3, Funny)
That's what novice "experts" usually say to do. Then you end up getting filenames that contain quotes. So what started as just escaping spaces turns into escaping spaces and two types of quotes. Depending on the approach you use here, you may need to escape some other characters, just in order to escape quotes, just so you can escape spaces, just so you can deal with filenames containing spaces.
Any sensible person would say "fuck it" and just use a real scripting language like Python, Ruby or Perl.
Re:None, I have given up bash scripting (Score:3, Funny)
Visual Basic (Score:2, Funny)
I know this is like cursing in the church, but I use VB for most tasks others would use shell scripts for. Why? For one, the syntax is more predictable. With Bash you always have to worry about special characters and I can't stand that. (Same reason I dislike Tex.) Secondly, if you need user interaction, it has a really easy to use GUI builder. When VB4 came out it was like 1995 or something. It is now 2010 and in my opinion, for building simple dialogues (or even not so simple ones) VB is still among the best. That said, it has downsides, the most important one is that piping is missing by default. However, there are Win32/Wine functions you can call to alleviate this. Put them in a standard module with some wrappers and it's like they're part of the language.
Re:None, I have given up bash scripting (Score:3, Funny)
Re:None, I have given up bash scripting (Score:3, Funny)
Use emacs. It's the best of all worlds...
Re:None, I have given up bash scripting (Score:1, Funny)
Well... (Score:3, Funny)
I would, don't get me wrong. Emacs is a lovely operating system. I just wish it had a decent text editor.
Re:Pashua on OS X (Score:3, Funny)
FYI, no version of Linux is registered Unix.
Thank God for that!