On Saturday, 14 September 2013 at 08:23:54 UTC, Nick Sabalausky wrote:
On Fri, 13 Sep 2013 19:56:14 -0400
"Jonathan M Davis" <jmdavisp...@gmx.com> wrote:

I guess that it's a matter of perspective. Personally, I find the Windows/DOS shell to be completely unusable and use git-bash when I'm forced to use Windows. Windows definitely has some things going for it (e.g. its graphics engine creams the horror that is X.org IMHO), but on the whole, I find that Linux is just way better for a power user like myself. Windows doesn't even come close to cutting it.


While I definitely prefer bash to the windows prompt overall, there are some places where I think windows makes the linux cmdline look bad.
Like launching a GUI program instead of a CLI:

Windows (nice):
% program-cli file.txt
% program-gui file.txt

Linux (wtf?!):
% program-cli file.txt
% program-gui file.txt >/dev/null 2>%1 &

But that's not always right - sometimes you need this instead:
% gksudo program-gui file.txt >/dev/null 2>%1 &

But that's not always right either. On some systems it's:
% kdesudo program-gui file.txt >/dev/null 2>%1 &

Of course, Linux *also* provides many ways to do it *wrong*, which are
naturally more convenient:

# Hangs your terminal until you close the gui app,
# which is so very useful an enormous 0% of the time:
% program-gui file.txt >/dev/null 2>%1

# Seems to work, but various warnings will be randomly
# spewed into your terminal while you're trying to use it.
% program-gui file.txt >/dev/null &

# Same as previous, but with more random spewings.
% program-gui file.txt &

# Wrong sudo (there are apparently good technical reasons
# you're not supposed to do this, even though it normally
# appears to works fine anyway)
% sudo program-gui file.txt >/dev/null 2>%1 &

On my Linux systems I like to stick these into one of my bin
directories (trying to do this from memory, so I may not have it
exactly right):

% cat gui
#!/bin/sh
"$*" >/dev/null 2>%1 &

% cat gsudo
#!/bin/sh
# Or kdesudo for KDE
gksudo "$*" >/dev/null 2>%1 &

Then it's just...
% gui kate stuff.d
% gsudo kate /some/system/file

...Until the next time I'm on a different unix machine and have to
remember to use the full magic incantation again.

You are either dishonest or a complete morron. By respect for you, I'll pick the first one.

Reply via email to