in reply to Better Way to Do it 2

Hmmm, probably the first one-liner I've seen that I actually understand.
Clobber me if I'm wrong, and I realize that this is not the thrust of your post, but isn't passing a user-given string to open an invite for the user to do unexpected things to your files? (e.g. user types ">filename" and clobbers a file)

Replies are listed 'Best First'.
Re: Better Way to Do it 2
by Abigail-II (Bishop) on Aug 27, 2003 at 23:12 UTC
    but isn't passing a user-given string to open an invite for the user to do unexpected things to your files?

    Uhm, no. The user might clobber a file he already has write access to (probably his own), but that's it; there's no increased risk, his shell allows him to mess up his files already. Unless you run that program suid, but there's no need for that.

    Abigail