Skip to content

Instantly share code, notes, and snippets.

@ttdoda
Created April 20, 2020 23:15
Show Gist options
  • Save ttdoda/e2b00d6afa835301787400ca06f59ec3 to your computer and use it in GitHub Desktop.
Save ttdoda/e2b00d6afa835301787400ca06f59ec3 to your computer and use it in GitHub Desktop.
sed result
sue@taiyo% wc test.dat
12780000 39280001 391120000 test.dat
sue@taiyo% repeat 10 time sed '/\(\)/d' test.dat
sed '/\(\)/d' test.dat 2.38s user 0.08s system 99% cpu 2.458 total
sed '/\(\)/d' test.dat 2.56s user 0.06s system 99% cpu 2.626 total
sed '/\(\)/d' test.dat 2.48s user 0.07s system 99% cpu 2.556 total
sed '/\(\)/d' test.dat 2.53s user 0.08s system 99% cpu 2.607 total
sed '/\(\)/d' test.dat 2.49s user 0.07s system 99% cpu 2.560 total
sed '/\(\)/d' test.dat 2.42s user 0.08s system 99% cpu 2.515 total
sed '/\(\)/d' test.dat 2.55s user 0.09s system 97% cpu 2.717 total
sed '/\(\)/d' test.dat 2.54s user 0.07s system 99% cpu 2.617 total
sed '/\(\)/d' test.dat 2.45s user 0.07s system 99% cpu 2.522 total
sed '/\(\)/d' test.dat 2.46s user 0.08s system 99% cpu 2.558 total
sue@taiyo% repeat 10 time sed '/^/d' test.dat
sed '/^/d' test.dat 2.74s user 0.07s system 99% cpu 2.813 total
sed '/^/d' test.dat 2.78s user 0.07s system 99% cpu 2.862 total
sed '/^/d' test.dat 2.80s user 0.07s system 99% cpu 2.874 total
sed '/^/d' test.dat 2.65s user 0.08s system 99% cpu 2.738 total
sed '/^/d' test.dat 2.79s user 0.08s system 99% cpu 2.882 total
sed '/^/d' test.dat 2.85s user 0.07s system 99% cpu 2.929 total
sed '/^/d' test.dat 2.70s user 0.07s system 99% cpu 2.767 total
sed '/^/d' test.dat 2.77s user 0.09s system 99% cpu 2.861 total
sed '/^/d' test.dat 2.89s user 0.08s system 99% cpu 2.975 total
sed '/^/d' test.dat 2.63s user 0.07s system 99% cpu 2.709 total
sue@taiyo% repeat 10 time sed '/.*/d' test.dat
sed '/.*/d' test.dat 10.15s user 0.09s system 99% cpu 10.259 total
sed '/.*/d' test.dat 10.02s user 0.09s system 99% cpu 10.132 total
sed '/.*/d' test.dat 10.18s user 0.08s system 99% cpu 10.261 total
sed '/.*/d' test.dat 10.20s user 0.08s system 99% cpu 10.286 total
sed '/.*/d' test.dat 11.53s user 0.12s system 99% cpu 11.653 total
sed '/.*/d' test.dat 10.29s user 0.08s system 99% cpu 10.377 total
sed '/.*/d' test.dat 10.25s user 0.10s system 99% cpu 10.364 total
sed '/.*/d' test.dat 10.36s user 0.09s system 99% cpu 10.474 total
sed '/.*/d' test.dat 10.19s user 0.08s system 99% cpu 10.283 total
sed '/.*/d' test.dat 10.23s user 0.10s system 99% cpu 10.334 total
sue@taiyo% sed --version
sed (GNU sed) 4.2.2
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by Jay Fenlason, Tom Lord, Ken Pizzini,
and Paolo Bonzini.
GNU sed ホームページ: <http://www.gnu.org/software/sed/>.
GNU ソフトウェアを使用する際の一般的なヘルプ: <http://www.gnu.org/gethelp/>.
電子メールによるバグ報告の宛先: <bug-sed@gnu.org>
報告の際、“Subject:” フィールドのどこかに “sed” を入れてください。
翻訳に関するバグは<translation-team-ja@lists.sourceforge.net>に報告してください。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment