New answers tagged coreutils
This was unnecessarily disruptive and was reverted for >= coreutils-8.7 Since then you need to specify %.Y etc to get the fractional part included
You might find this collection of examples interesting: Pattern Matching and Permuted Term Indexing with Command Line Tools in Linux
The [ is always given as an equivalent to test, but I had'nt seen the ] mentioned explicitly, although it is always there. I have just now found this in http://ss64.com/bash/test.html : When the [ form is used, the last argument to the command must be a ] which is reassuring -- at last I have completion as they say.
The [ command is the same as the test command. It allows you to write rather terse conditional statements in shell scripts. From the SunOS manual page: if [ "$1" = "pear" ] || [ "$1" = "grape" ] || [ "$1" = "apple" ] then command fi If you remove it, scripts will break!
The [ binary residing under the /bin tree in many GNU/Linux distributions is not something to be alarmed off. At least in my Fedora 19 it is a part of the coreutils package, as demonstrated below: $ rpm -qf /bin/[ coreutils-8.21-13.fc19.x86_64 and is a synonym for test to allow for expressions like [ expression ] to be written in shell scripts or even ...
Top 50 recent answers are included