cookutils rev 766
cooker: restore previous $command (again)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat Oct 10 18:51:21 2015 +0200 (2015-10-10) |
parents | 55614babc99a |
children | 180bb05a4cf5 |
files | cooker |
line diff
1.1 --- a/cooker Sat Oct 10 14:17:56 2015 +0200 1.2 +++ b/cooker Sat Oct 10 18:51:21 2015 +0200 1.3 @@ -58,8 +58,8 @@ 1.4 1.5 clean_exit() { 1.6 rm -f $command; touch $command 1.7 - ps | grep -q "${previous_command/:/ }" && 1.8 - echo "$previous_command" > $command 1.9 + [ "$previous_command" ] && ps | grep -q "${previous_command/:/ }" && 1.10 + echo -n "$previous_command" > $command 1.11 rm -f $pidfile 1.12 } 1.13