{"categories":["\u30b7\u30a7\u30eb","\u843d\u66f8\u304d"],"version":"1.0","title":"shuf\u30b3\u30de\u30f3\u30c9\u304c\u306a\u3044\u3068\u304d\u306b\u540c\u3058\u3053\u3068\u3092\u3059\u308b\u30b7\u30a7\u30eb\u30b9\u30af\u30ea\u30d7\u30c8","blog_title":"hogashi.*","image_url":null,"provider_url":"https://hatena.blog","provider_name":"Hatena Blog","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fblog.hog.as%2Fentry%2F2024%2F10%2F04%2F155243\" title=\"shuf\u30b3\u30de\u30f3\u30c9\u304c\u306a\u3044\u3068\u304d\u306b\u540c\u3058\u3053\u3068\u3092\u3059\u308b\u30b7\u30a7\u30eb\u30b9\u30af\u30ea\u30d7\u30c8 - hogashi.*\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","height":"190","author_url":"https://blog.hatena.ne.jp/hogashi/","width":"100%","author_name":"hogashi","description":"shuf \u30b3\u30de\u30f3\u30c9\u3068\u306f\u3001\u5165\u529b\u306e\u884c\u3092\u30b7\u30e3\u30c3\u30d5\u30eb\u3057\u3066\u51fa\u529b\u3059\u308b\u30b3\u30de\u30f3\u30c9\u3002 shuf invocation (GNU Coreutils 9.5) \u624b\u5143\u306e\u74b0\u5883\u306b\u5165\u3063\u3066\u306a\u304b\u3063\u305f\u306e\u3067\u3001\u3053\u3046\u3044\u3046\u306e\u3092\u66f8\u3044\u3066\u307f\u305f\u3002 Bash \u3067\u8a66\u3057\u3066\u3044\u307e\u3059\u3002\u30aa\u30d7\u30b7\u30e7\u30f3\u3068\u304b\u306f\u5b9f\u88c5\u3057\u3066\u307e\u305b\u3093\u3002 function shuf() { OLD_IFS=$IFS IFS=$'\\n' ( for line in $( if [ -n \"$1\" ]; then cat \"$1\" else cat /dev/stdin fi ); do echo \"$RANDOM\"$'\\t'\"$line\" done ) | sort -n | cut -f2-\u2026","published":"2024-10-04 15:52:43","url":"https://blog.hog.as/entry/2024/10/04/155243","blog_url":"https://blog.hog.as/","type":"rich"}