- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
Make sure you run /bin/true directly, most shells have a built in true that is called instead of the "real" true.
Admin
Interestingly, an empty file does not work as "true" on a modern Linux system ("exec format error"), but a file containing just a newline does.
Admin
I like how no one seems to have commented on the /bin/true shown here having an interpreter line pointing in /usr/, which in emergency situations might not be mounted or mountable (if your system has /usr/ on a seperate partition). Meaning a tool in /bin/ which is supposed to be reliable in an emergency is rendered useless. Heaven help you if your root/system bashrc/cshrc/whatever depends on /bin/true (why? I dunno).
Sure it could just be that /usr/ is just a symlink back to / and this isn't a problem. But is every system setup like that? (I only know of cygwin that actually does that.)
Granted, in theory, /bin/ might be as unavailble as /usr/ in an emergency. But in that case, you're screwed as you have no fsutils or even a /bin/sh for init to use.
Admin
my /bin/true:
mov eax, 1 mov ebx, 0 int 0x80
enough said.
Admin
I don't know why anybody is making light of True/False - these are actually useful applications in shell scripting on linux/*nix. If you've ever wanted something to repeat itself indefinitely you would use the while(true) do {} construct.
Admin
Yeah, I get annoyed easily. And, yes, I understand that the usage of the term has drifted, but still. . .
Wanna make somethin' of it?
Admin
Regarding
, I note that under Red Hat Linux, it's an approximately 14K byte executable. . . and it takes command line options, including "help":Admin
Regarding
, I note that under Red Hat Linux, it's an approximately 14K byte executable. . . and it takes command line options, including "help":Admin
When will alex start paying for submissions? He makes money from this site and according to his shitty comic you should always be paid.
Admin
Wondering how long before your (and this) comment gets deleted. For those of you just tuning in, Alex has disabled comments on the comics and has been deleting comments that mention that he's doing it. If it pisses you off that he's ignoring the interests of all the people that contribute to this website, stop contributing. We'll see how long the site lasts without content.
Admin
Admin
Whilst I don't agree with the deletion of comments. I suggest a far more effective way to get to your goal is to ignore the comic entirely. I don't understand why you are reading it if you don't like it but should traffic to those comics be low enough, they will be pulled in time (think of a poor TV show).
Having everyone refuse to submit content results in a site no one can enjoy, given enough time, that quality will not come back, regardless of the comic's fate.
Admin
FreeBSD /usr/src/usr.bin/true/true.c:
Admin
I'd make a joke about entering boxes here, but I don't want to lower the tone.
Admin
Oooh, it's like an expert version of one of those puzzles where you have to rearrange the tiles by sliding one at a time, where there is only space for one tile to move at a time. You know, where you get them all in the right place it makes a picture?!
Except I think someone forgot to leave one tile out so that you can move them :(
Admin
Okay so they've got 'true' down, and presumably there is a corresponding 'false' too. Now all they need is the 'FileNotFound'. I guess that one should be easy!
Admin
A Bus! SIGBUS
Admin
The version history will likely be license changes.
Admin
True gridlock is where the only way out of it is if you either (a) hire a crane, or (b) get a police man along to force people to go the "wrong" way.
If all the cars in the boxed bit of the junction just decided to turn right (when safe to do so), the gridlock would clear in about 10 seconds, but they're all too stubborn/dumb to do that (well, apparently some did, since there are some cars at the top right which could only have done that)
What puzzles me is the white van who seems to be on the wrong side of the road at the top left - I'm not quite sure what he's doing...
Of course if all the traffic lights are stuck on green, then the problem will happen again shortly, as the two main directions (top left <-> bottom right) will block the other stream (from top right), so they will eventually pull out to try and get across and block everything up. Mr police man with wavy arms is the only solution in that case.
Admin
Maybe the caller wasn't good at explaining himself. You will generally get more throughput if the lights are 3 minutes green/3 minutes red than if they're 10 seconds green/10 seconds red.
That might be what he meant (of course it may be that he was just dumb)
Admin
real 0m11.640s user 0m4.548s sys 0m6.252s
Funny how the user time is almost three times that of the 25s case. It's a 2.3 GHz Xeon BTW, easily outperformed by most P4s on trivial things, it's just that it keeps its speed up whatever you throw at it :)
Admin
TRWTF is that there is no new article since 3 days!
Admin
Heh...when I saw the picture first, I though "Well, that must be from India". Then I read it's from Brazil ... let's just say, in India this might still be called fluent traffic ;). In a large city, anyways, it's just like that every day. I used to walk the last 500 metres or so to my apartment, because I would be there faster than the bus.
Admin
Actually, it's pretty hard to see other car colors than black, dark red or silver around here these days. Still, I'd rather have a black car here than OMG-steal-me-now yellow or you-will-never-sell-it-later-even-for-10%-of-its-price light green.
Admin
Admin
real 0m11.640s user 0m4.548s sys 0m6.252s
Funny how the user time is almost three times that of the 25s case. It's a 2.3 GHz Xeon BTW, easily outperformed by most P4s on trivial things, it's just that it keeps its speed up whatever you throw at it :)
Admin
Great idea! Why don't you start us off?
Admin
Admin
[quote]Better than British Gas, who automatically direct debit a fixed amount that has nothing to do with the amount on your (estimated) bill[/blockquote] Cingular billed me 3 early termination fee on my 3 phones 3 times in a month - after I halted payment because they were withdrawing all 3 phones 3 times a month. Their argument was I had to pay my bill before they would investigate my complaint that I went from fully paid to owing 900+ in 3 months - with no overages or other charges & a family plan totaling $120/mo for 18 months prior.
Admin
Dammit! I sprayed Mt Dew all over my monitor!
Admin
So...The lying, attention-whoring, stealing-and-TAKING-CREDIT twit who submitted the gridlock picture isn't banned and/or publicly humiliated (in the ARTICLE itself, not just in the comments) why exactly?
He plaigarized. He took credit for someone else's photo. He essentially lied to the staff here.
Why is this community tolerating that kind of douchebaggery?
String him up.
Admin
Linux has a man page for /bin/true:
TRUE(1) User Commands
NAME true - do nothing, successfully
SYNOPSIS true [ignored command line arguments] true OPTION
DESCRIPTION Exit with a status code indicating success.
AUTHOR Written by Jim Meyering.
REPORTING BUGS Report bugs to [email protected].
COPYRIGHT Copyright © 2006 Free Software Foundation, Inc. This is free software. You may redistribute copies of it under the terms of the GNU General Public License http://www.gnu.org/licenses/gpl.html. There is NO WARRANTY, to the extent permitted by law.
SEE ALSO The full documentation for true is maintained as a Texinfo manual. If the info and true programs are properly installed at your site, the command
File: coreutils.info, Node: true invocation, Next: test invocation, Prev: false invocation, Up: Conditions
PLUS an info page
16.2 `true': Do nothing, successfully
true' does nothing except return an exit status of 0, meaning "success". It can be used as a place holder in shell scripts where a successful command is needed, although the shell built-in command
:' (colon) may do the same thing faster. In most modern shells,true' is a built-in command, so when you use
true' in a script, you're probably using the built-in command, not the one documented here.true' honors the
--help' and `--version' options.Note, however, that it is possible to cause
true' to exit with nonzero status: with the
--help' or `--version' option, and with standard output already closed or redirected to a file that evokes an I/O error. For example, using a Bourne-compatible shell:This version of `true' is implemented as a C program, and is thus more secure and faster than a shell script implementation, and may safely be used as a dummy shell for the purpose of disabling accounts.
==================
The WTF is the documented true failure modes.
Admin
Sure, it show's you your bill, but it also just goe's to show that when they send you screenshot's, sometime's you can have problem's when you try to see all the billing line's. Doe's it mean they could leave out some item's? You'll never know! Their processe's must be really messed up.
Oop's! That last line should read:
There processe's must be really messed up.
Thats better. :P
Admin
while [ 1 == 1 ] do; echo "He's dead, Jim"; done
I think somebody should write to Dennis Kernighan, or somebody.
However, I think the point was about the implementation and the revision numbers: not the dubious nature of "true."
Admin
Thanks for clarifying this point. I thought the yellow markings meant something like: "Hey, let us all drive on the wrong side of the road!".
Admin
Admin
Hmm. I do tend to get a little excited about apostrophes at times. Possibly because if I put them in my code, it fails to compile - so I get more time to argue that changing "just the language files, main menu layout, and image files", after porting & testing has been completed, is a stupid idea.
Admin
1
Admin
i am from mumbai, india and that looks like normal rush hour to me. The lights are not to be blamed, they work for the most part. The truly amazing thing is how quickly these things clear up, provided the police dont interfere. It involves driving on the kerb though. I mean, i am not going to let a stupid traffic jam stop me from getting on with my life and my business, am I :)
Admin
/* Exit with a status code indicating success. Copyright (C) 1999-2003, 2005 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#include <config.h> #include <stdio.h> #include <sys/types.h> #include "system.h"
/* Act like "true" by default; false.c overrides this. */ #ifndef EXIT_STATUS
define EXIT_STATUS EXIT_SUCCESS
#endif
#if EXIT_STATUS == EXIT_SUCCESS
define PROGRAM_NAME "true"
#else
define PROGRAM_NAME "false"
#endif
#define AUTHORS "Jim Meyering"
/* The name this program was run with. */ char *program_name;
void usage (int status) { printf (_("
Usage: %s [ignored command line arguments]\n
or: %s OPTION\n
"), program_name, program_name); printf ("%s\n\n", (EXIT_STATUS == EXIT_SUCCESS ? "Exit with a status code indicating success." : "Exit with a status code indicating failure.")); fputs (HELP_OPTION_DESCRIPTION, stdout); fputs (VERSION_OPTION_DESCRIPTION, stdout); printf (USAGE_BUILTIN_WARNING, PROGRAM_NAME); printf (("\nReport bugs to <%s>.\n"), PACKAGE_BUGREPORT); exit (status); }
int main (int argc, char **argv) { initialize_main (&argc, &argv); program_name = argv[0]; setlocale (LC_ALL, ""); bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE);
atexit (close_stdout);
/* Recognize --help or --version only if it's the only command-line argument. */ if (argc == 2) { if (STREQ (argv[1], "--help")) usage (EXIT_STATUS);
exit (EXIT_STATUS); }
Admin
If the intersection was empty when they pulled into it they can hardly be blamed when the people to their right also pulled into it, blocking their way out after they were already in the intersection. Or did it escape you that this is a photograph of a single intersection, and not four?
Admin
Of course, since any car in front of you may come to a sudden and complete stop at any time for any reason or no reason at all, the only way to comply with this law is to maintain a following distance of the width of the entire intersection plus the length of your car. And that's if you ignore the possibility that the other car may not only stop but start backing up.
Admin
$ filenotfound filenotfound: No such file or directory
seems to work fine for me.
Admin
Admin
For those of you who are curious.
For reference,
Admin
Well, think of how much faster it is in binary...
Admin
Finally, we know what the three-valued boolean type was for! It was for exit status codes.
$ true & false & filenotfound & filenotfound: command not found [1]- Done true [2]+ Exit 1 false [3]+ Exit 127 filenotfound
Admin
Yet I do not have another telephone number I can use or a second computer I can use, as I know that will allow me to at least post one additional posting by having a least one additional phone number to set up a 3rd CL account.
Admin
Yesterday I got an email from Craigslist and I could only check on my phone so I couldn't see the real email address and it said the POST/EDIT/DELETE thing saying I tried posting a vibrator. Is this normal for Craigslist to get this or are people scamming me?
Admin
There is absolutely no way I would ever use Comcast for ANYTHING! Their customer service is totally sh!t!