전체 글 464

Bash Script 유용한 Tip

Bash Script 유용한 Tip파라매터 설정출처 : http://wiki.bash-hackers.org/syntax/peLooking for a specific syntax you saw, without knowing the name?Simple usage$PARAMETER${PARAMETER}Indirection${!PARAMETER}Case modification${PARAMETER^}${PARAMETER^^}${PARAMETER,}${PARAMETER,,}${PARAMETER~}${PARAMETER~~}Variable name expansion${!PREFIX*}${!PREFIX@}Substring removal (also for filename manipulation!)${PARAMETER#P..

포인터의 개념.

pointer는 포인터의 주소 계산 범위pointer는 지정 형식 많큰 주소 값을 계산한다. indexr값으로 인한 주소 뛰는 범위 char * 1 byte씩 건너뛰고short * 2 byte 씩 건너뛰고int * 4 byte씩 건너뛰고 long * 8byte 씩 건너 뛴다. ex) 예제~~소스 코드 int main(int argc, const char *argv[]){ char b[30]="abcdefghijklmnopqrstu"; char *c=b; int *d=(int*)b; long *l=(long*)b; fprintf(stderr,"%s\n",b); fprintf(stderr,"char %c int %c long %c\n",b[0],d[1],l[1]); return 0;} 결과char b int..

프로그래밍 2016.12.27