xuanhao 发表于 2018-8-26 07:37:15

shell 中不能用history

  看到别人问一个问题,shell 中不能用history命令。所以我自己刚好也没有遇到过,就去试了试,果真直接写到shell中不能用,所以只有用bash的一些选项算是勉强完成了。
  code:
  #!/bin/bash
  bash -i -c 'set -o history;history;'

页: [1]
查看完整版本: shell 中不能用history