上一页 1 ··· 190 191 192 193 194 195 196 197 198 ··· 403 下一页
摘要: 001、 (base) root@PC1:/home/test2# ls ## 当前目录下三个文件夹 test1 test2 test3 (base) root@PC1:/home/test2# tree ## 使用tree命令查看 . ├── test1 │ ├── 1.txt │ ├── 2.t 阅读全文
posted @ 2022-08-11 15:48 小鲨鱼2018 阅读(1526) 评论(0) 推荐(0)
摘要: 001、 (base) root@PC1:/home/test2# ls a.txt (base) root@PC1:/home/test2# cat a.txt ## 测试数据 a b c e a d a d e a f j 3 j k r a d a a a a a a f f a e (bas 阅读全文
posted @ 2022-08-11 15:10 小鲨鱼2018 阅读(127) 评论(0) 推荐(0)
摘要: printf命令用于格式化输出 001、输出字符串 %s (base) root@PC1:/home/test2# printf "%s\n" abcde ## %s 输出字符串 abcde (base) root@PC1:/home/test2# printf "xxx--%s\n" abcde 阅读全文
posted @ 2022-08-11 14:26 小鲨鱼2018 阅读(1312) 评论(0) 推荐(0)
摘要: cmp命令用于判断两个文件是否相同 001、 (base) root@PC1:/home/test2# ls (base) root@PC1:/home/test2# seq 5 > a.txt; seq 3 > b.txt; seq 5 > c.txt ## 3个测试文件 (base) root@ 阅读全文
posted @ 2022-08-11 14:10 小鲨鱼2018 阅读(356) 评论(0) 推荐(0)
摘要: 001、 [ -a FILE ] 如果 FILE 存在则为真。 [ -b FILE ] 如果 FILE 存在且是一个块特殊文件则为真。 [ -c FILE ] 如果 FILE 存在且是一个字特殊文件则为真。 [ -d FILE ] 如果 FILE 存在且是一个目录则为真。 [ -e FILE ] 如 阅读全文
posted @ 2022-08-11 13:51 小鲨鱼2018 阅读(371) 评论(0) 推荐(0)
摘要: -s选项; 01、文件不存在; 为假 02、文件存在,但是大小为空; 为假 03、文件存在,且大小不为空; 为真 001、 [ -s file ]:文件存在且不为0是为真。 (base) root@PC1:/home/test2# ls a.txt b.txt (base) root@PC1:/ho 阅读全文
posted @ 2022-08-11 13:46 小鲨鱼2018 阅读(1025) 评论(0) 推荐(0)
摘要: 001、 (base) root@PC1:/home/test2# ls a.txt (base) root@PC1:/home/test2# cat a.txt 1 2 8 10 (base) root@PC1:/home/test2# cat -s a.txt ## 将多个连续的空行压缩为一个空 阅读全文
posted @ 2022-08-11 13:35 小鲨鱼2018 阅读(63) 评论(0) 推荐(0)
摘要: 001、 = 判断字符串是否相同 (base) root@PC1:/home/test2# a=abcd (base) root@PC1:/home/test2# b=opqr (base) root@PC1:/home/test2# c=abcd ## 测试字符串 (base) root@PC1: 阅读全文
posted @ 2022-08-11 13:25 小鲨鱼2018 阅读(599) 评论(0) 推荐(0)
摘要: 001、 #include <stdio.h> int main(void) { int a = 10; double b = 5.5; printf("a = %f\n", a); ## %f输出int型 printf("b = %d\n", b); ## %d输出double型 return 0 阅读全文
posted @ 2022-08-11 01:22 小鲨鱼2018 阅读(793) 评论(0) 推荐(0)
摘要: 001、 运算对象, 即操作数的类型不同时,较小的数据类型操作数会转换为较大的数据类型(范围更大), 然后再进行运算。 例如 int + double型, 自动转换为double + double型。(因为double型比int型可以表示的范围更大。) 阅读全文
posted @ 2022-08-11 00:54 小鲨鱼2018 阅读(283) 评论(0) 推荐(0)
上一页 1 ··· 190 191 192 193 194 195 196 197 198 ··· 403 下一页