{"blog_url":"https://n9d.hatenadiary.org/","width":"100%","categories":[],"version":"1.0","title":"bash\u306efunction\u7248 rungcc","published":"2009-01-06 19:18:56","blog_title":"\u8a08\u7b97\u6a5f\u3068\u622f\u308c\u308b\u65e5\u3005","provider_url":"https://hatena.blog","url":"https://n9d.hatenadiary.org/entry/20090106/1231237136","author_url":"https://blog.hatena.ne.jp/n9d/","provider_name":"Hatena Blog","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fn9d.hatenadiary.org%2Fentry%2F20090106%2F1231237136\" title=\"bash\u306efunction\u7248 rungcc - \u8a08\u7b97\u6a5f\u3068\u622f\u308c\u308b\u65e5\u3005\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","type":"rich","author_name":"n9d","height":"190","image_url":null,"description":"bash\u306efunction\u7248 rungcc\u3092\u4f5c\u3063\u3066\u307f\u305f\u3002 \u30aa\u30ea\u30b8\u30ca\u30eb\u3068\u6bd4\u8f03\u3057 \u30d5\u30a1\u30a4\u30eb\u306e\u5148\u982d\u306e#!/home/usr/bin/rungcc \u304c\u3067\u304d\u306a\u3044\u3060\u3051\u3002\uff08\u3053\u3053\u3082bash -c\u30aa\u30d7\u30b7\u30e7\u30f3\u7b49\u304c\u3082\u3046\u5c11\u3057\u7814\u7a76\u3067\u304d\u308c\u3070\u5148\u306b\u3044\u3051\u305d\u3046\u306a\u6c17\u914d\u304c\u3042\u308b\u3002\uff09\u4ee5\u4e0b\u3092.bashrc\u306b\u66f8\u304d\u8fbc\u3080 function rungcc(){ e=/tmp/___$$;t=$e.c;p=\"echo -n\";echo \"#include <stdio.h>\">$t;if [ $# = 2 ];then if [ $1 == -e ];then $p \"$2\">>$t;else $p \"int main(){\">>$t;a='pri\u2026"}