Shell命令记录

1、shell结果赋值变量

pwd 的输出被赋给变量 currPath,打印currPath,创建bin目录

1
2
3
currPath=$(pwd) 或 $ currPath=`pwd`
echo $currPath
mkdir $currPath/bin

2、根据pid查询Jar位置

1、使用命令查询pid 2、根据pid查询jar路径

1
2
ps -ef|grep java
ll /proc/$pid/cwd

StringTable学习

习题一(JDK1.8) public class TestStringTable {      //运行环境JDK1.8     public static void main(String[] args) {         String s1 = "a";         String s2 = "b";         String s3 = &quo...
阅读更多