tail -fみたいに流しながら見たいんだけど、色んなコマンドが出力をバッファしちゃうので、困ったときはそのコマンドにバッファしないオプションが無いか探すのがオヌヌメ。
man command -> bufferとかで検索
--line-buffered
Use line buffering, it can be a performance penality.
$ iostat -x 1 | grep --line-buffered 'sda'
| $ perl -Ilib benchmark/simple.pl http://127.0.0.1/icons/apache_pb.gif | |
| 3b5ddd008f7ab078b42c5fbbf1861a715dee8da3 | |
| Perl/5.8.8 on i386-linux-thread-multi | |
| Furl/0.21, LWP/5.837, WWW::Curl/4.15, HTTP::Lite/2.3, libcurl[libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5] | |
| -- | |
| Connection: close | |
| Date: Thu, 20 Jan 2011 08:57:10 GMT | |
| Accept-Ranges: bytes | |
| ETag: "3803e-916-4c23b600" | |
| Server: Apache/2.2.3 (CentOS) |
| find /path/to/dir/ -type f | time parallel --eta 'rsync -aRz --compress-level=1 {} remote:/' |
| use strict; | |
| use warnings; | |
| use Plack::Request; | |
| use Plack::Response; | |
| use LWP::UserAgent; | |
| use URI; | |
| use JSON; | |
| use Encode; |
| # twty -h | |
| Usage of twty: | |
| -f ID: specify favorite ID | |
| -i ID: specify in-reply ID, if not specify text, it will be RT. | |
| -l USER/LIST: show list's timeline (ex: mattn_jp/subtech) | |
| -u USER: show user's timeline | |
| -r: show replies | |
| -v: detail display | |
| # twty |
| ============================================================================== | |
| 入力支援記法: *hatena_edit_rule* | |
| ------------------------------------------------------------------------------ | |
| 見出し記法 | |
| > | |
| *~~ | |
| < | |
| 日記に見出し(h3)を付けます |
| package main | |
| func main() { | |
| println([]int("あいうえお")[1] == 'い') // true | |
| println([]byte("あいうえお")[2] == 130) // true | |
| } |
| #!/usr/bin/env perl | |
| package RangeFile; | |
| use strict; | |
| use warnings; | |
| use 5.10.0; | |
| use Fcntl qw/:seek/; | |
| use parent qw/Exporter/; |
| -- before query | |
| EXPLAIN | |
| SELECT a.id, a.title | |
| FROM comment c | |
| INNER JOIN article a ON c.article = a.id | |
| GROUP BY a.id ORDER BY MAX(c.created_at) DESC LIMIT 10; | |
| -- alter table | |
| ALTER TABLE article |
| ___ _____ _ _ _ | |
| / _ \ ___ _ __ ___ | ___(_)_ _____ __| | | | |
| | | | |/ _ \| '_ \/ __| | |_ | \ \/ / _ \/ _` | | | |
| | |_| | (_) | |_) \__ \_ | _| | |> < __/ (_| |_| | |
| \___/ \___/| .__/|___(_) |_| |_/_/\_\___|\__,_(_) | |
| |_| |