[20171120]bash使用here documents的一个小细节.txt --//昨天看bash文档,,发现一些小细节,做一个记录,就是EOF加引号的问题. command <<'EOF' cmd1 cmd2 arg1 $var won't expand as parameter substitution turned off by single quoting EOF --//例子: $ cat a.sh#! /bin/bashcat <<'EOF'this is a t…
写一个小程序,用来计算它包含的代码所需的耗时.虽然简单,测试代码是否耗时还是有点用的,不用重新写嘛~ import java.util.Date; import java.util.concurrent.TimeUnit; public class TimeLag { private Date start; private Date end; public TimeLag() { start = new Date(); } public String cost() { end = new Dat…