¾ðÊó²Ê³Ø¤ò³Ø¤ÖÂç³ØÀ¸¤¬¥×¥í¥°¥é¥ß¥ó¥°(C¸À¸ì,Java¤Ê¤É)¡¢¥Í¥Ã¥È¥ï¡¼¥¯¡¢»ñ³Ê»î¸³(¾ðÊó½èÍýµ»½Ñ¼Ô»î¸³,CCNA)¤Ê¤É¤Ë´Ø¤¹¤ëµ»ö¤ò½ñ¤¤¤Æ¤¤¤Þ¤¹¡£
°ÊÁ°ºî¤Ã¤¿cat¥×¥í¥°¥é¥à¤ò¸ø³«¤·¤Þ¤¹¡£
¥ª¥×¥·¥ç¥ó¤Ï¼ÂÁõ¤·¤Æ¤¤¤Þ¤»¤ó¤¬¡¢°ú¿ô¤Ë¥Õ¥¡¥¤¥ë̾¤ò¼è¤ë¾ì¹ç¤È¼è¤é¤Ê¤¤¾ì¹ç¤Ë¤ÏÂбþ¤·¤Æ¤¤¤Þ¤¹¡£
/* mycat.c */
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[]) {
FILE *f;
int i, ch;
if(argc == 1) {
while(1) {
while((ch = getchar()) != atoi("\n")) {
fputc(ch, stdout);
}
}
}
if(argc > 1) {
for(i=1; i<argc; i++) {
f = fopen(argv[i], "rb");
while((ch = fgetc(f)) != EOF) {
fputc(ch, stdout);
}
fclose(f);
}
}
return 0;
}
$ ./mycat sample1.txt This is the first sample file. $ ./mycat sample2.txt This is the second sample file. $ ./mycat sample3.txt This is the third sample file. $ ./mycat sample1.txt sample2.txt This is the first sample file. This is the second sample file. $ ./mycat sample1.txt sample2.txt sample3.txt This is the first sample file. This is the second sample file. This is the third sample file. $ ./mycat hello hello hi hi
| Linux¥×¥í¥°¥é¥ß¥ó¥°¡½ÎãÂê¤Ç³Ø¤ÖUNIX¥×¥í¥°¥é¥ß¥ó¥°´Ä¶¤Î¤¹¤Ù¤Æ | |
![]() | Neil Matthew Richard Stones ³ëÀ¾ ½ÅÉ× ¥½¥Õ¥È¥Ð¥ó¥¯¥¯¥ê¥¨¥¤¥Æ¥£¥Ö 2004-08 Çä¤ê¾å¤²¥é¥ó¥¥ó¥° : 122818 ¤ª¤¹¤¹¤áÊ¿¶Ñ ![]() ¤Ï¤¸¤á¤Î°ìÊâ¤ËAmazon¤Ç¾Ü¤·¤¯¸«¤ë by G-Tools |
| ¿·Linux/UNIXÆþÌç | |
![]() | ÎÓ À²Èæ¸Å ¥½¥Õ¥È¥Ð¥ó¥¯¥¯¥ê¥¨¥¤¥Æ¥£¥Ö 2004-07 Çä¤ê¾å¤²¥é¥ó¥¥ó¥° : 41645 ¤ª¤¹¤¹¤áÊ¿¶Ñ ![]() ½é¿´¼Ô¤Ë¤Ï¤Á¤ç¤Ã¤ÈÆñ¤·¤¤¡© ´Ö°ã¤¤¤Ê¤¤ÆþÌç½ñ ¥Ð¥¤¥Ö¥ëŪ¤Ë¤º¤Ã¤È»È¤¨¤ë£±ºý¤À¤È»×¤¤¤Þ¤¹¡£Amazon¤Ç¾Ü¤·¤¯¸«¤ë by G-Tools |
¥Æ¡¼¥Þ:¥×¥í¥°¥é¥ß¥ó¥° - ¥¸¥ã¥ó¥ë:¥³¥ó¥Ô¥å¡¼¥¿ - ¥½¡¼¥·¥ã¥ë¥Ö¥Ã¥¯¥Þ¡¼¥¯:
![]()
Author:TBVector
»ä¤Î¥µ¥¤¥È
¥Ö¥Ã¥¯¥Þ¡¼¥¯¤ÈRSS
ͧã¤Î¥µ¥¤¥È
¤¢¤ï¤»¤ÆÆÉ¤ß¤¿¤¤
¤Ï¤Æ¤Ê¥ê¥ó¥°