« first day (3291 days earlier)      last day (1646 days later) » 

12:52 AM
@Ungeheuer think of the newline as a line terminator, not as a line separator. it makes the lines more consistent, and concatenating files together gets easier when the final line also has a newline: no need to add one in between (similar to why those Unicode byte-order markers are annoying.)
@Ungeheuer though programs that care about the newline on the very last line can be annoying, I think it's better to try to do something sensible even if it's missing.
Or even if it exists and you're just expecting one string, perhaps a password... Some LDAP tools borked if the password file had the terminating newline... Rather annoying, since usually you can't even use a newline in a password with any interactive too.
 
 
5 hours later…
5:47 AM
So, I upvoted Gareth's post, FWIW.
I'm not sure why, out of all the people I've met in real life, it's him I keep running into online. But strange are the ways of the world.
 
 
4 hours later…
10:17 AM
Good news. My evil cousin just got arrested.
I definitely feel safer. Though safety is relative, of course.
 
 
5 hours later…
3:39 PM
I have a program which executes this type of command /bin/sh -c "exec file $(which ls)". Can I assume that every Linux distribution with any shell can run this command without error?
 
4:00 PM
@Biswapriyo No. You'll get a "Illegal variable name." error from the csh shell for that command, as far as I can see. The csh shell does not understand the $(...) command substitution, which it tries to parse since the inline sh -c script is in double quotes. Use single quotes instead.
If you need to support ancient sh shells as well, use backticks instead of $(...) for the command substitution (in addition to using single quotes around the exec ... bit).
 

« first day (3291 days earlier)      last day (1646 days later) »