Reputation
Next tag badge:
540/400 score
76/80 answers
Badges
20 153 313
Newest
 Nice Answer
Impact
~5.2m people reached

3h
comment File System that is order sensitive
What do you mean? Are those a, b c entries in the directory. Entries in a directory have no particular order, I'm not sure how you're envisaging the order to have any relevance. In what context?
8h
comment Output of stat on OSX
IRIX also had a stat command long before the GNU or BSD ones. zsh also had a stat builtin long (though not as long) before GNU and BSD ones.
8h
comment Output of stat on OSX
Note that's there's no Linux stat (unless you're refering to Linux stat() system call), just GNU stat from GNU coreutils.
8h
comment Why is my stat command output different than examples online?
there are many different stat commands, that's not a standardized command.
9h
comment Generate random numbers in specific range
That's a duplicate of cuonglm's answer
12h
comment Peculiar Solaris integer comparison behaviour
As already discussed, all shells have conformance bugs. I'm not under the impression that bash has more than ksh93, at least not in the functionality that are most likely to be exerted by most POSIX scripts. set -e is one feature I avoid (and prefer explicit error handling. IMO relying on it in a script is bad practice, makes sense for make, but then that's generally one simple command at a time). If you're referring to the behaviour for bash -ec '(false; echo A); echo B', I believe it was fixed in bash-4.0.
12h
comment Why does [A-Z] match lowercase letters in bash?
@schily, yes the shell has to decide what to do with those bytes not forming parts of valid characters. What I'm saying is that treating them as if they were the characters whose code point has the same value as that byte value is not the best approach IMO. Hence me starting the discussion on the zsh ML (an on the Austin group 2 months ago).
13h
comment Peculiar Solaris integer comparison behaviour
Note that bash is used as the /bin/sh of at least one certified Unix compliant system (OS/X though /bin/sh there is bash built with strict compliance enabled). I'd doubt many POSIX scripts would be broken by a sh being a symlink to bash though.
13h
comment Peculiar Solaris integer comparison behaviour
It's also consistent with atoi(), strtod() and other tools that get numbers out of strings (sort -n, awk '{print 0+$1}'...)
13h
comment Why does [A-Z] match lowercase letters in bash?
@schily, in that case, the \xFF was expanded to the 0xFF byte by my shell (zsh) before passing to schily-sh. schily-sh internally wrongly identified it to U+00FF. You may want to have a look at the current discussion on the zsh ML. Note that ksh93 is a bit broken as well in that b=$'\xff' ksh -c $'[[ $b = [\uff] ]]' returns false but b=$'\xff' ksh -c $'[[ $b = [[:alpha:]] ]]' returns true.
15h
comment Quickly find all files that start with a given string
It also won't report the name of the file the string is found in.
15h
comment Quickly find all files that start with a given string
Note that you can optimize it by adding a -size +9c
15h
comment Quickly find all files that start with a given string
Another thing that is not standard (and won't be despite me asking), is the missing semicolon or newline in between those two actions.
15h
comment Quickly find all files that start with a given string
nextfile is not POSIX but is found in several awk implementations and scheduled for inclusion in the next version of the standard.
15h
comment Quickly find all files that start with a given string
Same as unix.stackexchange.com/q/217546
1d
comment Why does [A-Z] match lowercase letters in bash?
@schily, I've raised the question on the zsh-workers mailing list
1d
comment Why does [A-Z] match lowercase letters in bash?
@schily, having said that, it seems that zsh behaves the same. yash won't allow invalid character.
1d
comment Why does [A-Z] match lowercase letters in bash?
@schily, note that \xFF there is the byte 0xFF, not the character U+00FF (ÿ itself encoded as 0xC3 0xBF). \xFF alone doesn't form a valid character so I can't see why it should be matched by [É-Ź].
1d
comment Why does [A-Z] match lowercase letters in bash?
@schily, sorry my bad, I had messed up my test cases
1d
comment Why does [A-Z] match lowercase letters in bash?
Sorry, I had messed up my test cases, On Solaris, I had LC_ALL in the environment and was only changing LC_COLLATE. env -i LC_ALL=en_GB.UTF-8 truss -t '' -u ::setlocale bash -c 'LC_COLLATE=en_GB.utf8; [[ c = [A-Z] ]] && echo A; LC_COLLATE=C; [[ c = [A-Z] ]] && echo B' instead of env -i LC_COLLATE=en_GB.UTF-8 truss -t '' -u ::setlocale bash -c 'LC_COLLATE=en_GB.utf8; [[ c = [A-Z] ]] && echo A; LC_COLLATE=C; [[ c = [A-Z] ]] && echo B'. So yes, it is working correctly on both Solaris and GNU