diff options
-rwxr-xr-x | gist | 8 |
1 files changed, 1 insertions, 7 deletions
@@ -91,13 +91,7 @@ tmp_file() { | |||
91 | mktemp -p $tmp_dir -t $1.XXXXXX | 91 | mktemp -p $tmp_dir -t $1.XXXXXX |
92 | fi | 92 | fi |
93 | } | 93 | } |
94 | tac() { | 94 | tac() { sed -e '1! G; h; $!d' $1; } # An easy way to reverse file content both on Linux and Darwin |
95 | if [[ $(uname) == Darwin ]]; then | ||
96 | tail -r $1 | ||
97 | else | ||
98 | $(which tac) $1 | ||
99 | fi | ||
100 | } | ||
101 | mtime() { | 95 | mtime() { |
102 | if [[ $(uname) == Darwin ]]; then | 96 | if [[ $(uname) == Darwin ]]; then |
103 | stat -x $1 | grep Modify | cut -d' ' -f2- | 97 | stat -x $1 | grep Modify | cut -d' ' -f2- |