1 | int main( int argc, char *argv[] ) |
1 2 3 4 5 6 7 8 9 10 11 12 13 | // test.c #include <stdio.h> int main( int argc, char *argv[] ) { int i; for (i = 0 ; i < argc ; i++) { printf("argv[%d] = %s\n", i, argv); } return 0; } |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | $ gcc -Wall -o test test.c $ ./test arg1 arg2 argv[0] = ./test argv[1] = arg1 argv[2] = arg2 $ mv test newtest $ ./newtest arg1 argv[0] = ./newtest argv[1] = arg1 $ ln -s newtest linktest $ ./linktest arg argv[0] = ./linktest argv[1] = arg |
1 2 | $ tar xvfz busybox-1.1.1.tar.gz $ |
1 2 3 4 | $ cd busybox-1.1.1 $ make defconfig $ make $ |
1 2 3 4 5 6 7 | $ ./busybox pwd /usr/local/src/busybox-1.1.1 $ ./busybox ash /usr/local/src/busybox-1.1.1 $ pwd /usr/local/src/busybox-1.1.1 /usr/local/src/busybox-1.1.1 $ exit $ |
欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) | Powered by Discuz! 7.0.0 |