Slashdot stories can be listened to in audio form via an RSS feed, as read by our own robotic overlord.

 



Forgot your password?
typodupeerror

Slashdot videos: Now with more Slashdot!

  • View

  • Discuss

  • Share

We've improved Slashdot's video section; now you can view our video interviews, product close-ups and site visits with all the usual Slashdot options to comment, share, etc. No more walled garden! It's a work in progress -- we hope you'll check it out (Learn more about the recent updates).

×

Comment: Re:I only write trivial shell scripts (Score 3, Interesting) 411

by OA (#31905756) Attached to: Adding Some Spice To *nix Shell Scripts

I agree python is lots of fun... but I do not call following script to be nontrivial.

> In Python, you can do things like
> junk_extension = (".temp", ".tmp", ".junk")
> if filename.endswith(junk_extension):
> os.remove(filename)

Your problem is: thinking ten lines of "if" statements to look at a filename.

This kind of things are done in 1 liner single shell command. This is too simple to bother python.

Please read about the "find" command. especially with --exec rm '{}' \;

Osamu

Comment: Zenity , dialog, ... (Score 1) 411

by OA (#31905678) Attached to: Adding Some Spice To *nix Shell Scripts

There is zenity for GTK from shell.

There are other dialog tools out-there too.

It adds spice to a dish (program).

If you want different dishes, you are free to chose any toolkit (tcl/tk, C with GTK, ...).

If you look at Debian installer, it is based on many shell scripts. You can chose its frontend to be GUI. So limitation of shell script is only within people's mind. Just use right tools in smart way.

That's all.

Osamu

There are two major products that come out of Berkeley: LSD and UNIX. We don't believe this to be a coincidence. -- Jeremy S. Anderson

Working...