 |
 |
|
 |
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Nicolas Alvarez <nic### [at] gmail is the best com> wrote:
> > In a graphical user interface it's more difficult to make them
> > interoperate, which is probably one reason why they usually don't.
> And also one reason why command-line tools are better for many things.
True, although I have to admit that sometimes a graphical user interface
just makes some things easier, faster and more practical (although not so
many things as many people seem to believe.)
> (image editing probably not one of them)
Basically anything involving heavy amounts of multimedia.
(Playing video/music files may be a borderline case, though. For example
mplayer is a superb command-line media player, and mencoder is a good
command-line tool for converting videos and a good "ripping" tool.)
--
- Warp
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
> I love the Unix philosophy of making specific, lightweight tools that
> interoperate, rather than gargantuan monolithic beasts that do
> everything rather poorly.
See, now, personally I hate that. It annoys the hell out of me that the
Unix way is to use 50,000 tiny tools with all have far too many
backwards compatibility modes, bugs and "features".
["This makes it read from a file. Unless the file is named '-', in which
case it reads from stdin." OK, so how do I make it read from a file
that's actually named '-' then? And other surprising ad-hoc behaviours...]
But then, I guess that's just my opinion.
--
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
> ["This makes it read from a file. Unless the file is named '-', in which
> case it reads from stdin." OK, so how do I make it read from a file
> that's actually named '-' then? And other surprising ad-hoc behaviours...]
./-
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Nicolas Alvarez wrote:
>> ["This makes it read from a file. Unless the file is named '-', in
>> which case it reads from stdin." OK, so how do I make it read from a
>> file that's actually named '-' then? And other surprising ad-hoc
>> behaviours...]
>
> ./-
OK. But it now means that if you write a script that does this, you need
to explicitly check whether the file you're going to process just
happens to be called "-" and manually escape it if it is. And just
think, if you didn't realise that, your script might be used for *years*
before somebody tries to use it in that specific way and makes it crash
spectacularly.
Urg. Anyways...
--
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
> Nicolas Alvarez wrote:
>>> ["This makes it read from a file. Unless the file is named '-', in
>>> which case it reads from stdin." OK, so how do I make it read from a
>>> file that's actually named '-' then? And other surprising ad-hoc
>>> behaviours...]
>>
>> ./-
>
> OK. But it now means that if you write a script that does this, you need
> to explicitly check whether the file you're going to process just
> happens to be called "-" and manually escape it if it is. And just
> think, if you didn't realise that, your script might be used for *years*
> before somebody tries to use it in that specific way and makes it crash
> spectacularly.
1. If the file is called -, you're calling for trouble anyway.
2. Whoever passes a filename to your script should be using the ./- thing.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Orchid XP v7 <voi### [at] dev null> wrote:
> > I love the Unix philosophy of making specific, lightweight tools that
> > interoperate, rather than gargantuan monolithic beasts that do
> > everything rather poorly.
> See, now, personally I hate that. It annoys the hell out of me that the
> Unix way is to use 50,000 tiny tools with all have far too many
> backwards compatibility modes, bugs and "features".
He was talking about the unix philosophy, not how this philosophy has
been implemented in some environments.
--
- Warp
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Nicolas Alvarez <nic### [at] gmail is the best com> wrote:
> 1. If the file is called -, you're calling for trouble anyway.
> 2. Whoever passes a filename to your script should be using the ./- thing.
Many shellscripts break with file names with spaces in them. This is
because surprisingly few unix geeks know that in shell scripts you have
to use "$@" to refer to all the command-line arguments, not $*.
--
- Warp
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Warp wrote:
> Nicolas Alvarez <nic### [at] gmail is the best com> wrote:
>> 1. If the file is called -, you're calling for trouble anyway.
>
>> 2. Whoever passes a filename to your script should be using the ./- thing.
>
> Many shellscripts break with file names with spaces in them.
Actually, it's worse. There are surprisingly few utilities that don't
break on *any* possible file name.
Here's a contest. Given the directory /tmp/stuff, delete all the files
in that directory that end with ".tmp".
Let's see how many iterations it takes to get actually right.
--
Darren New / San Diego, CA, USA (PST)
"That's pretty. Where's that?"
"It's the Age of Channelwood."
"We should go there on vacation some time."
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
> Here's a contest. Given the directory /tmp/stuff, delete all the files
> in that directory that end with ".tmp".
>
> Let's see how many iterations it takes to get actually right.
Then I guess rm /tmp/stuff/*.tmp isn't good enough? :)
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Nicolas Alvarez wrote:
>> Here's a contest. Given the directory /tmp/stuff, delete all the files
>> in that directory that end with ".tmp".
>>
>> Let's see how many iterations it takes to get actually right.
>
> Then I guess rm /tmp/stuff/*.tmp isn't good enough? :)
That doesn't even work if there *aren't* funky characters in the file name.
--
Darren New / San Diego, CA, USA (PST)
"That's pretty. Where's that?"
"It's the Age of Channelwood."
"We should go there on vacation some time."
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |