ÃÑ ÆäÀÌÁö ¼ö : 3224
![]()
|
Facebook Joinc ±×·ì
Joinc QA »çÀÌÆ®
![]()
Tweet
joinc´Â Firefox¿Í chrome¿¡¼ Å×½ºÆ® Çß½À´Ï´Ù. IE¿¡¼´Â Å×À̺íÀÌ ±úÁö°Å³ª À̹ÌÁö°¡ º¸ÀÌÁö ¾ÊÀ» ¼ö ÀÖ½À´Ï´Ù. ƯÈ÷ ±¸±Û DocsÀ̹ÌÁöÀÇ °æ¿ì ¿¢¹Úó¸®µÉ ¼ö ÀÖ½À´Ï´Ù.
¿©±â¿¡¼ Áß¿äÇÑ °ÍÀº ÄÄÇ»ÅÍ¿¡¼ »ç¿ëµÇ´Â ¸í»ç¸¦ Áß½ÉÀ¸·Î ´Ü¾î¸¦ Á¦°ÅÇÏ´Â °ÍÀÌ´Ù. ³ôÀº ¼öÁØ¿¡¼ Á¶»ç¸¦ Á¦°ÅÇÏÁö´Â ¾ÊÀ» °ÍÀÌ´Ù.
#include <sys/types.h> #include <regex.h> #include <string.h> #include <stdio.h> #include <errno.h> #include <set> #include <string> #include <map> using namespace std; const char token[] ="<>-,()/\\\"';:{}+!@#$&*=[]%?\n "; void invertStr(char *src, char *dst) { int len, i; char b[20] = {0x00,}; len = strlen(src); for (i = 0; i < len; i += 2) { dst[len-i-2] = src[i]; dst[len-i-1] = src[i+1]; } } int tailerdel(char *tr, int); const int MAXTAILNUM=7; char a[][MAXTAILNUM] ={"·Î½á", "·Î¼", "À¸·Î½á", "À¸·Î¼" , "Àº", "´Â", "ÀÌ","°¡","ÇÏ´Â","Çϸé","°ú","¶ó¸é","¿¡¼", "ÇØ¼", "\0"}; set<string> tailer; int main(int argc, char **argv) { FILE *fp; char line[1024]; char *tr; char buf[20]; int tlen; char *pt; char dst[20]; pt = *a; while(pt[0] != '\0') { for (int i = strlen(pt)-2; i >= 0; i-=2) { tailer.insert(pt+i); } pt = pt+MAXTAILNUM; } fp = fopen(argv[1],"r"); if (fp == NULL) return 1; int depth; while(fgets(line, 1024, fp) != NULL) { tr = strtok(line, token); while(tr != NULL) { tr = strtok(NULL, token); sprintf(buf, "%s", tr); if (tr != NULL) { depth = tailerdel(tr, 0); if (depth) { buf[strlen(buf)-(depth*2)] = '\0'; printf("====>%s %s\n", tr, buf); } } } } } int tailerdel(char *tr, int depth) { set<string>::iterator si; for (int i = strlen(tr)-2*(depth) ; i >= 0; i-=2) { si = tailer.find(tr+i); if (si != tailer.end()) { depth++; tailerdel(tr+i, depth); } } return depth; }
´ÙÀ½Àº Å×½ºÆ® °á°ú´Ù. ÄÄÇ»ÅÍ¿ë¾î¿Í °ü·ÃµÇ¾î¼´Â ±×·°Àú·° °á°ú¸¦ º¸¿©ÁÖ´Â°É È®ÀÎÇÒ ¼ö ÀÖ´Ù.
background====>background ÇÁ·Î±×·¥°ú====>ÇÁ·Î±×·¥ Daemon====>Daemon ÇÁ·Î±×·¥Àº====>ÇÁ·Î±×·¥ ¾ö¿¬ÇÑ====>¾ö¿¬ÇÑ Â÷À̰¡====>Â÷ÀÌ ÀÖ´Ù.====>ÀÖ´Ù. br====>br background====>background ÇÁ·Î±×·¥Àº====>ÇÁ·Î±×·¥ Å͹̳ÎÀ»====>Å͹̳ÎÀ» °¡ÁöÁö¸¸====>°¡ÁöÁö¸¸ Daemon====>Daemon ÇÁ·Î±×·¥Àº====>ÇÁ·Î±×·¥ °¡ÁöÁö====>°¡ÁöÁö ¾Ê´Â´Ù.====>¾Ê´Â´Ù. br====>br º¸Åë====>º¸Åë µ¥¸óÇÁ·Î±×·¥Àº====>µ¥¸óÇÁ·Î±×·¥ Ưº°ÇÑ====>Ưº°ÇÑ ÀÏÀÌ====>ÀÏ ¾ø´ÂÇÑ====>¾ø´ÂÇÑ »ç¿ëÀÚ¿Í====>»ç¿ëÀÚ¿Í »óÈ£´ëÈÇÒ====>»óÈ£´ëÈÇÒ (null)====>(null) ¾øÀÌ====>¾ø ¾Æ¹«µµ====>¾Æ¹«µµ ¸ð¸£°Ô====>¸ð¸£°Ô telnet====>telnet httpd====>httpd mysql====>mysql PID====>PID PPID====>PPID PGID====>PGID SID====>SID CLS====>CLS PRI====>PRI STIME====>STIME |
|
|
EmailÀ» ±âÀÔÇϸé, ´ñ±ÛÀÌ ¸ÞÀÏ·Î Àü´ÞµË´Ï´Ù. |
|