Next: , Up: Common Tasks   [Contents][Index]


4.1 ±ÜÍ÷¤ÈÊÔ½¸

ÆÃÄê¤Î´ð½à¤òËþ¤¿¤¹¥Õ¥¡¥¤¥ë¤Î¥ê¥¹¥È¤ò¸«¤ë¤¿¤á¤Ë¡¤°ú¿ô¤Ë¥Õ¥¡¥¤¥ë̾¤òÍѤ¤ ¤Æ¡¤Ã±½ã¤Ë¥Õ¥¡¥¤¥ë¥Ó¥å¡¼¥¢¡¼¥×¥í¥°¥é¥à¤ò¼Â¹Ô¤·¤Þ¤¹¡¥¥·¥§¥ë¤Ï¡¤¥Ð¥Ã¥¯¥¯ ¥ª¡¼¥È¤Ç°Ï¤Þ¤ì¤¿¥³¥Þ¥ó¥É¤ò¡¤¤½¤Î½ÐÎϤËÃÖ´¹¤¹¤ë¤Î¤Ç¡¤¥³¥Þ¥ó¥ÉÁ´ÂΤϰʲ¼ ¤Î¤è¤¦¤Ë¤Ê¤ê¤Þ¤¹¡¥

less `find /usr/include -name '*.h' | xargs grep -l mode_t`

¥Õ¥¡¥¤¥ë¥Ó¥å¡¼¥¢¡¼¥×¥í¥°¥é¥à¤ÎÂå¤ï¤ê¤Ë¥¨¥Ç¥£¥¿¤Î̾Á°¤òÍ¿¤¨¤ë¤³¤È¤Ç¡¤¤³ ¤ì¤é¤Î¥Õ¥¡¥¤¥ë¤òÊÔ½¸¤¹¤ë¤³¤È¤â²Äǽ¤Ç¤¹¡¥

emacs `find /usr/include -name '*.h' | xargs grep -l mode_t`

¥³¥Þ¥ó¥É¥é¥¤¥ó¤Ë¤Ï¸ÄÊ̤ÎŤµ¤ËÀ©¸Â¤¬¤¢¤ë¤Î¤Ç¡¤¤³¤ÎÊýË¡¤Ç½èÍý¤µ¤ì¤ë¥Õ¥¡ ¥¤¥ë¿ô¤Ë¤ÏÀ©¸Â¤¬¤¢¤ê¤Þ¤¹¡¥°Ê²¼¤Î¤è¤¦¤Ëxargs¤ò»ÈÍѤ¹¤ë¤³¤È¤Ç¡¤ ¤³¤ÎÌÌÅݤʤ³¤È¤ò²óÈò¤·¤Þ¤¹¡¥

find /usr/include -name '*.h' | xargs grep -l mode_t > todo
xargs --arg-file=todo emacs

¤³¤ì¤Ç¡¤xargs¤Ï¥Õ¥¡¥¤¥ëtodo¤Ë¥ê¥¹¥È¥¢¥Ã¥×¤µ¤ì¤Æ¤¤¤ë¤¹¤Ù¤Æ ¤Î¥Õ¥¡¥¤¥ë¤ËɬÍפʲó¿ô¡¤emacs¤ò¼Â¹Ô¤·¤Þ¤¹¡¥