2004-09-03 (Fri)
_ [Ruby] ワンライナー
beryllium 側で移行する passwd と shadow を調べるために 以下のスクリプトを考えたのですが, 2 つ目の Ruby インタープリタ呼出しは一行で書けずに ";" を使ってしまいました.
[雄也の?日坊主日記(2004-09-03)より引用]
$ ruby -e 'print open("/etc/shadow").grep(/^(?:#{$<.map {|l| l.split(/:/)[0]}.join("|")})/)'
とか。
あと、一つ目は
$ ruby -F: -ane 'print if $F[3] == "100"' /etc/passwd
の方が楽かも。
[ツッコミを入れる]
[TrackBack URL: http://shugo.net/jit/tb.rb/20040903]
本日のリンク元
- http://www.pson-wd.com/psn/CHARA/ ×10
- http://press.eek.jp/result/子供の名前/子供の名前 chara ×7
- http://blog.chew.jp/result/shadow/shadow △ ×6
- http://search.live.com/results.aspx?q=shadow&mrt=e... ×5
- tDiary.Net[sho] ×4
- http://www.j96.org/~yuya/d/20040905.html ×4
- http://bloger.x0.com/result/max/max etc ×4
- http://www.saiyasuweb.com/2/c/カステラ ×4
- http://www.j96.org/~yuya/d/?category=Ruby ×4
- http://wordtantei.com/result/ane/ane con ×4
- http://w-seek.jp/w/CHARA/ ×4
- http://search.live.com/results.aspx?q=result ×3
- http://search.live.com/spresults.aspx?q=Aneキャン ×3
- http://www.j96.org/~yuya/d/?date=20040903 ×3
- http://wordtantei.com/result/ane/ane キャン ×3
- http://search.live.com/spresults.aspx?q=ぐりとぐら&firs... ×3
- tDiary.Net[kazuhiko](2004-07-30) ×3
- http://www.j96.org/~yuya/d/ ×2
- http://wordtantei.com/result/ane/ane 11w ×2
- http://www.myprofile.ne.jp/blog/archive/FFF/18 ×2
- http://blog.chew.jp/result/shadow/shadow passwd ×2
- http://bloger.x0.com/result/open/open cobol ×2
- http://search.live.com/results.aspx?q=shugo-chara&... ×2
- http://www.myprofile.ne.jp/FFF blog 2004 01 4 ×2
- http://search.live.com/results.aspx?q=ぐりとぐら日記&FORM... ×2
- http://blog.chew.jp/result/shadow/shadow etc ×2
- http://www.rubyist.net/~matz/200408.html ×2
- http://caojon.seesaa.net/article/419493.html ×2
- http://www.rubyist.net/~matz/20040819.html ×2
- ただのにっき(2004-08-30) ×1
- http://b.hatena.ne.jp/korn_freak/ ×1
- http://blog.chew.jp/result/max/max etc ×1
- http://mixi.jp/home.pl ×1
- http://search.live.com/results.aspx?q=result&form=... ×1
- http://www.j96.org/~yuya/d/20040903.html ×1
- http://sbs.mobile.yahoo.co.jp/p/sbs/mobilesite/sea... ×1
- http://blog.chew.jp/result/join/join リリース ×1
- http://kodou.net/diary/?date=200408 ×1
- http://wordtantei.com/result/ane/aneキャン ×1
- http://chara-max.com/82AE82E882C682AE82E7/ ×1
- http://www.shioshiopg.clubsite.jp/fsearch/search.a... ×1
- http://www.rubyist.net/~matz/20040722.html ×1
- http://www.pson-wd.com/psn/CHARA/chara 本.html ×1
- http://mput.dip.jp/mput/?date=20040201 ×1
- http://mixi.jp/new_friend_diary.pl ×1
- http://b.hatena.ne.jp/korn_freak/ruby/ ×1
- http://sbs.mobile.yahoo.co.jp/p/sbs/mobilesite/sea... ×1
- http://www.j96.org/~kouji/diary/?date=20040811 ×1
- http://search.live.com/spresults.aspx?q=ぐりとぐら&firs... ×1
- http://search.live.com/results.aspx?q=shadow&form=... ×1
- http://search.live.com/spresults.aspx?q=ぐりとぐら ×1
- http://search.live.com/spresults.aspx?q=ぐりとぐら&firs... ×1
- http://sbs.mobile.yahoo.co.jp/p/sbs/mobilesite/sea... ×1
- http://pub.cozmixng.org/~the-rwiki/rw-cgi.rb?cmd=v... ×1
- http://www.pson-wd.com/psn/CHARA/shugo chara.html ×1
- http://search.live.com/spresults.aspx?q=ぐりとぐら 嫌い&F... ×1
- http://d.hatena.ne.jp/sumim/ ×1
