上一页 1 ··· 39 40 41 42 43 44 45 46 47 ··· 55 下一页
摘要: scala读文件: example: scala> import scala.io.Sourceimport scala.io.Source scala> var inputFile = Source.fromFile("text.txt")inputFile: scala.io.BufferedS 阅读全文
posted @ 2019-01-30 17:18 嵌入式实操 阅读(209) 评论(0) 推荐(0) 编辑
摘要: scala 写文件功能: scala> import java.io.PrintWriterimport java.io.PrintWriter scala> val outputFile = new PrintWriter("text.txt")outputFile: java.io.PrintW 阅读全文
posted @ 2019-01-30 17:13 嵌入式实操 阅读(322) 评论(0) 推荐(0) 编辑
摘要: 控制台输出语句: print println example: scala> print("i=");print(i)i=345scala> println("hello ");println("world")hello world 阅读全文
posted @ 2019-01-30 17:01 嵌入式实操 阅读(163) 评论(0) 推荐(0) 编辑
摘要: 控制台输入语句: readInt, readDouble, readByte, readShort, readLong, readChar, readBoolean, readLine example:scala> import io.StdIn._import io.StdIn._ scala> 阅读全文
posted @ 2019-01-30 16:59 嵌入式实操 阅读(219) 评论(0) 推荐(0) 编辑
摘要: scala 变量: val : 声明时,必须被初始化,不能再重新赋值。 scala> test = "only1"<console>:11: error: not found: value test test = "only1" ^<console>:12: error: not found: va 阅读全文
posted @ 2019-01-30 16:44 嵌入式实操 阅读(187) 评论(0) 推荐(0) 编辑
摘要: scala 操作符: 算术运算符: + - * / % 关系统运算符: > , < ,= ,!= ,>=,<=, 逻辑运算符: && . || , ! 位运算符:&, |, ^,~,<<,>>,>>>(无符号右移) 赋值运算符: = 优先及由上及下 阅读全文
posted @ 2019-01-30 16:40 嵌入式实操 阅读(111) 评论(0) 推荐(0) 编辑
摘要: awk continue 语句 awk exit 语句 awk if 语句 awk next 语句 awk break 语句 阅读全文
posted @ 2019-01-30 15:13 嵌入式实操 阅读(176) 评论(0) 推荐(0) 编辑
摘要: 第一题: 使用if语句进行判断 阅读全文
posted @ 2019-01-30 15:12 嵌入式实操 阅读(146) 评论(0) 推荐(0) 编辑
摘要: 第一题:从/etc/passwd 匹配以 vmuser开头的用户 grep “^vmuser” /etc/passwd -r -n awk ‘/^vmuser /{print $0}’ /etc/passwd 第二题: 从/etc/passwd 匹配以/bin/bash结尾的行 grep “/bin 阅读全文
posted @ 2019-01-30 15:11 嵌入式实操 阅读(233) 评论(0) 推荐(0) 编辑
摘要: 转:http://www.zsythink.net/archives/1426 阅读全文
posted @ 2019-01-30 15:09 嵌入式实操 阅读(174) 评论(0) 推荐(0) 编辑
上一页 1 ··· 39 40 41 42 43 44 45 46 47 ··· 55 下一页