04 2013 档案
摘要:1.显示文件内容直接 cat filename [root@bogon cat_test]# cat file2 this is a test of cat this file's name is file22.显示文件内容,对非空白行编码 cat -b filenme [root@bogon cat_test]# cat -b file1 1 this is for test of cat 2 this filename is file1 3 last line3.对于比较大的文件,可以采用 cat filename |more 4.创建文件 cat >newfilename.
阅读全文
摘要:在学习tiny6410的led程序的时候,遇到这样一段代码。if (argc != 3 || sscanf(argv[1], "%d", &led_no) != 1 || sscanf(argv[2],"%d", &on) != 1 || on < 0 || on > 1 || led_no < 0 || led_no > 3) { fprintf(stderr, "Usage: leds led_no 0|1\ n"); exit(1); }本来以为这段略带炫技的代码不是很难,编译整个C文件生
阅读全文