Shell WTF
-
Definitely not me; I'm a Windows girl
and i'm a debian girl.... but windows 10 is looking damn tempting...
-
-
well i'll probably never go back to windows server and my gaming rig has always been windows so i think my collection will always be mixed OS. :-D
-
-
OSX is too hipster to be the Dark Side
-
I have many windows!
Most of them are terminals...
Meh...I prefer to have them in tabs in a single window.
-
@Yamikuronue said:
under the wrong name
Eh, doesn't bother me; can always symlink anywayThat's exactly what I did for @tarbot...
-
That's me.
-
Obligatory "pacman is better" argument.
-
On Windows, you wouldn't have to do any of this shit because you could just double-click a .msi file and hit "next".
Except you probably do, because Node is probably written by a team of fuckwits who didn't bother porting it to the most popular OS in the world.
On Linux, if someone designed a package, it'd just be
sudo dpkg -i filename.deb
and it'd install without any additional prompts.The problem is that no one has designed the package.
-
On Linux, if someone designed a package, it'd just be double-clicking a .deb file and it'd install without any additional prompts.
-
On Linux, if someone designed a package, it'd just be
sudo dpkg -i filename.deb
and it'd install without any additional prompts.
Perfect for installing on Red Hat then
-
Perfect for installing on Red Hat then
It's not any more difficult to install a package using rpm.
-
-
Meh...I prefer to have them in tabs in a single window.
I have to monitor stuff at times. Can't really see the content of multiple tabs at once. So it's mostly a thing of habit to hit Ctrl+Alt+T instead of Ctrl+Shift+T by now.
-
On Windows, you wouldn't have to do any of this shit because you could just double-click a .msi file and hit "next".
Yes, but maybe no. @cartman82 wants to keep multiple versions installed, which may or may not require custom installation scripts anyway (so they don't step all over each other). Is making an MSI file as easy as making your own Debian package? (The latter is trivially scriptable...)
For a long, long time, the best choice for scripting Windows users had was writing batch files. Bash was clearly superior, even if it is some 40 years old. Bash is out-dated, now. But there are better choices anyway.
Nobody will snort at you if you use cmd.exe for the simple run-an-application, move-a-file type of operation. But it would be silly to use batch files to script anything (at all, these days) when PowerShell is around.
On the Unix side, there are things like Rush (the Ruby shell -- a customized ruby interpreter with operating system handling commands built in) or Shelly or Shellac or or or. And then there are the specialized tools, which abstract away the tedium of scripting things like installers.
-
For a long, long time, the best choice for scripting Windows users had was writing batch files.
... no?
VBScript appeared 19 years ago, and became an OS default in Windows 98.
If you were writing batch files after VBScript (And JScript) were available, you're an idiot. I love hearing all about Windows from idiots who know NOTHING about Windows.
-
Good job! And VBScript makes custom installers easy to make because...
-
It doesn't? What the fuck are you talking about?
You said batch was the "best" choice people had for scripting Windows. That's untrue. I was pointing out it's untrue. Then calling you a dumbshit for spreading obvious lies. Dumbshit. I didn't mention installers at all.
-
Yes, but maybe no. @cartman82 wants to keep multiple versions installed, which may or may not require custom installation scripts anyway (so they don't step all over each other). Is making an MSI file as easy as making your own Debian package? (The latter is trivially scriptable...)
**Nobody will snort at you if you use cmd.exe for the simple run-an-application, move-a-file type of operation. But it would be silly to use batch files to script anything (at all, these days) when PowerShell is around. **
** On the Unix side, there are things like Rush (the Ruby shell -- a customized ruby interpreter with operating system handling commands built in) or Shelly or Shellac or or or. And then there are the specialized tools, which abstract away the tedium of scripting things like installers.**
Â
For a long, long time, the best choice for scripting Windows users had was writing batch files.
... no?
Yes.
VBScript appeared 19 years ago, and became an OS default in Windows 98.
So batch predates it by at least 10 years. And it was probably a bad idea to switch over to VBScript when it was in the 1.0 phase and pretty much useless. So call it 13 years. A long, long time. But my comment wasn't even meant to poop on Windows. It was to compare an outdated scripting language (cmd.exe) to another outdated scripting language (bash).
And your response has nothing to do with the actual discussion, wherein you said
On Windows, you wouldn't have to do any of this shit because you could just double-click a .msi file and hit "next".
and talked about installers and how easy they are to use in Windows. Notice that I agreed, but questioned how easy it would be to make a custom installer -- an operation which is trivially scriptable on the Unix side.
I then proceeded to discuss how Unix scripting languages have evolved, and that bash is outdated.
CHECK AND MATE LOSER
-
You know, I'd really hope that merely double-clicking on a .deb wouldn't install it without additional prompts. That would be a horrible security hole (though there's a few variations on what exactly the security hole would be). At the very least, there ought to be a check for whether to elevate the installer's privileges.
Unless you are going to go with signed installation packages, and then making them is a little bit more complex (because of the need for signing the package in the first place, which requires establishing a cryptographic identity with a known trust root).
-
It does a prompt on my machine - it opens gdebi-gtk, which shows me what the .deb contains and has an "install" button.
-
You know, I'd really hope that merely double-clicking on a .deb wouldn't install it without additional prompts.
Suckers. I have my stuff set up to only require a single click.
But, yeah, at minimum it requires you to enter your password to get elevated permissions required to install. I suppose if you were running as root...
And, as @aliceif says, there is still more input required to truly pull the trigger.
-
I suppose if you were running as root...
If one was running a GUI as root, that would be TRWTF. Some things are just catastrophically bad ideas.
-
Thar, screenshot for all the dirty GUI installer folk.
-
We Debian people don't need your dirty graphical installers
-
Just in case this was accusing me of using Ubuntu:
onyx@jarvis:~$ uname -a Linux jarvis 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt7-1 (2015-03-01) x86_64 GNU/Linux
-
Jarvis? WTF is that? The only thing I found is a video with some crappy thing that looks like Vista.
-
Isn't that gdebi-gtk?
-
Jarvis? WTF is that? The only thing I found is a video with some crappy thing that looks like Vista.
All my (home) computers are named after AIs from movies / shows / books. This one has a British accent, if that helps.
Isn't that gdebi-gtk?
It was in the metapackage. I don't mind it being installed. Doesn't mean it gets used much, if at all.
-
What's its current power level? Is it 400%?
-
onyx@jarvis:~$ upower -i $(upower -e | grep 'BAT') | grep -E "state|to\ full|percentage" - state: fully-charged percentage: 100%
Sadly, no.
-
-
rbemrose@powerlord:~$ uname -a Linux powerlord 3.13.0-48-generic #80-Ubuntu SMP Thu Mar 12 11:16:15 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
I'm a dirty Ubuntu user.
Granted, this box is just for running a TF2 server although I do have some tools on it to compile server mods1. Oh, and nginx to serve up static files for game server's FastDL.
1Which is part of the reason it uses Ubuntu instead of Debian.
-
My bots and my cyberparts run on Ubuntu too; the used to run on Amazon Linux, but that sucks. Ubuntu sucks too, but less.
-
A user interface has a series of objectives it has to fulfil: be easy for novice users to pick up, be efficient (fast) for advanced users, stop the user from making mistakes whenever possible, and some others I can't remember.
I'm not so sure it needs to protect you from your mistakes. It just needs better design.
That's right, I said it: Better design. It is ridiculous to make the option that the user-almost-never-wants the default. "
rm -rf
" is the perfect example: How often, in this life, do you want a command to affect every directory on your system?"But look, it's elegant!" is not an excuse. That version of
rm
is like having a cook stove that burns your house down every time you turn it on...unless you remember to press the little button that is labeled Confine flame to stove-top.
-
My bot runs on my NAS
Linux DiskStation 3.2.40 #5022 SMP Wed Jan 7 14:18:56 CST 2015 x86_64 GNU/Linux synology_x86_411+II
-
--no-preserve-root
much?I agree with the post btw, just sounds like you don't actually know all that much about rm :)
EDIT: Actually, that's pretty much exactly the logic behind requiring
--no-preserve-root
torm -rf /
. If you really want to destroy EVERYTHING, you better type in a few extra words
-
you don't actually know all that much about rm
Enough to break out a cold sweat every time I use it. I admit that I have little to do with Linux.
--no-preserve-root much?
I do, however, know about this. But there was Unix, and then there were Linux distroconcordia, and how many years before they got around to adding that option?
-
Because you too can create a directory named %HOME% in Windows Explorer, and before your third cup of coffee del /s /q %HOME% and destroy part of your user profile.
>echo %HOME% %HOME%
Huh.
>set home HOMEDRIVE=C: HOMEPATH=\Users\me
-
Yeah. In the example above though, I think
rm
is not the problem. Tilde-expansion is the problem.
-
Tilde-expansion is the problem
And you are probably right. But it is nothing but the same mis-design as the original
rm -rf
: The idea that recursion should process directories above the one you start it in...which is something no one ever wants to do. But it does it anyway, unless you push Confine flame to stove-top.
-
@sloosecannon said:
--no-preserve-root much?
I do, however, know about this. But there was Unix, and then there were Linux distroconcordia, and how many years before they got around to adding that option?
That's true. But if you're running a distro before that option, you probably have other issues.
Filed Under: IME every modern distro has that built in. YMMV
-
Yeah. In the example above though, I think
rm
is not the problem. Tilde-expansion is the problem.Yeah, I would definitely expect the opposite. It's kinda silly to ignore something in
./
in favor of a variable...
-
-
And in general the way there's no distinction between types of arguments. There is a lot of malice to be had with file names starting with a
-
in the right (or wrong) place. Or containing spaces.
-
I like this one:
I did something similar recently. I have a machine that was originally installed as straight Ubuntu, but I run KDE on it and I don't want the Unity login or other shit that comes with it, so I started removing shit. Eventually, I removed too much.
Had to run a live CD and chroot or whatever to reinstall some packages.
-
That's not even scriptable. I like it.
@trwtfbot including
--no-preserve-root
in shell scripts
-
including
--no-preserve-root
in shell scripts is TRWTF
-
You could say there's too much in the standard distribution metapackages, but that is a good reason to keep one of them in regardless.
Do know you can switch to a different one without a reinstall - if you remove
ubuntu-desktop
you're still safe if you installkubuntu-desktop
,ubuntu-gnome-remix
, or if you want to go free some minimal server metapackage to ensure you keep the essentials.