Slashdot Mirror


Adding Some Spice To *nix Shell Scripts

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?"

8 of 411 comments (clear)

  1. WTF? by Temkin · · Score: 0, Troll

    Why on God's green earth would I want to "spice up" my shell scripts?!?! Spicey shell scripts... What the hell is the world coming to?

    Now you kids get off my lawn!

  2. yes, that's very interesting. by gandhi_2 · · Score: 0, Troll

    but they are not user-friendly in the same way the Unix commands aren't

    Whatthefuckparseerror? I had to draw a truth table to figure this out. I still can't get it.

    they are user friendly, but not in the same way Unix commands are not?

    they are not user friendly for not the same reason unix commands are?

    ( ! shellScripts.isFriendly() )==(! unixCommands.isFriendly() )

  3. Re:None, I have given up bash scripting by Grishnakh · · Score: 0, Troll

    No, I expect competent programmers to not do incredibly stupid things, like use filenames with spaces in them. There is absolutely no good reason for it, and tons of reasons against it (including the fact that CLI shells on both Unix and Windows interpret spaces as a field separator).

  4. Re:None, I have given up bash scripting by Grishnakh · · Score: 0, Troll

    As I said before, I already provided a solution: error out when encountering broken filenames like this. A two-line test is all that's needed. There is absolutely no good reason to have a space in a filename. Enabling bad practices only allows these practices to continue, just like enabling freeloaders by giving them what they want will only cause them to continue freeloading instead of getting a job.

  5. Re:None, I have given up bash scripting by Grishnakh · · Score: 0, Troll

    That's why you error out when you encounter such a file.

    Plus, we're talking about bash scripting here, not C++ GUI application programming. How many "regular users" are using bash scripts from the command line? Since working with space-laden filenames is a PITA in the bash shell, I would expect any users who normally work at the command line to not be using such filenames.

  6. Re:None, I have given up bash scripting by Rudd-O · · Score: 1, Troll

    It does, for people who know 0.1% of what they use, but believe they know 90% and have strong opinions (that would be the person you are replying to).  GIVE HIM DA CODEZ TO HACK!  Hahaha!

    --
    Rudd-O - http://rudd-o.com/
  7. Re:None, I have given up bash scripting by citab · · Score: 0, Troll

    The real problem is that users insist on having spaces in their damn filenames... I ALWAYS preach against that to users... It's bad practice to have spaces in directory (folder names for stinking windoze users) or filenames in the first place.

    Users who insist on it should be flogged severely! (with old floppy disks)

    BOFH

  8. Re:Pashua on OS X by supssa · · Score: 0, Troll

    Pashua is Aqua, and Aqua has been deprecated for years now. Please move away from Pashua and work with a Cocoa interface.

    --
    Hatin' on products I don't like and getting modded up talking about tech I totally don't understand like it was 2005!