回答編集履歴
3
誤動作のため修正
answer
CHANGED
|
@@ -23,10 +23,10 @@
|
|
|
23
23
|
fi
|
|
24
24
|
|
|
25
25
|
# historyのキャッシュを保存して、HISTFILEを切り替える
|
|
26
|
-
eval "history -
|
|
26
|
+
eval "history -w $HISTFILE" # write down the cache on HISTFILE
|
|
27
|
+
eval "history -c" # delete cache
|
|
27
28
|
export HISTFILE=$histfile
|
|
28
|
-
eval "history -c" # delete cache
|
|
29
|
-
eval "history -
|
|
29
|
+
eval "history -r $HISTFILE" # read HISTFILE and set up new cache
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
追加参考
|
2
参考を追加
answer
CHANGED
|
@@ -27,4 +27,7 @@
|
|
|
27
27
|
export HISTFILE=$histfile
|
|
28
28
|
eval "history -c" # delete cache
|
|
29
29
|
eval "history -n" # read HISTFILE and set up new cache
|
|
30
|
-
```
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
追加参考
|
|
33
|
+
http://omoshiro-joho.com/tech-center/tips/tips_200408170045.html
|
1
使い方をメモり
answer
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
解決後のコードです。使い方は以下の通り。
|
|
2
|
+
$ source this.sh {normal or lpic}
|
|
2
3
|
|
|
3
4
|
```bash
|
|
4
5
|
#!bin/bash
|