转摘自:http://www.blogjava.net/flysky19/articles/93492.htmljava 使用相对路径读取文件1.java project环境,使用java.io用相对路径读取文件的例子:*目录结构: DecisionTree |___src |___com.decisiontree.SamplesReader.java |___resource |___train.txt,test.txt*SamplesReader.java: String filepath="resource/train.txt";//注意filepath的内容; Fi Read More
posted @ 2013-09-16 17:46 奋斗中的毛毛虫 Views(6877) Comments(0) Diggs(0) Edit
read -n 1 -p "Let's go(y or n):"if [ "$REPLY"x = "y"x -o "$REPLY"x = "Y"x ]; then#do somethingfi①、注意空格。eg.if [ $REPLY = "Y" ]示例中为了看的明显,输入了连续的空格,写shell脚本时,只需一个空格即可。注意等号两边必须有空格。②、单一的条件判断,即没有else分支如上例所示:需在 if [ ];需在if条件判断语句后面加入分号;如果含else语句 Read More
posted @ 2013-09-16 14:56 奋斗中的毛毛虫 Views(224) Comments(0) Diggs(0) Edit