plans: fix done-n
This commit is contained in:
parent
f46fc2f042
commit
b009381983
1 changed files with 1 additions and 1 deletions
|
@ -18,7 +18,7 @@ pkgs.writeShellScriptBin "plans" ''
|
|||
fi
|
||||
if [ "$1" = "done" ] ; then
|
||||
if [ "$2" != "" ] ; then
|
||||
head -n $2 ~/sync/plans.txt > ~/plans.txt.tmp
|
||||
head -n $(($2 - 1)) ~/sync/plans.txt > ~/plans.txt.tmp
|
||||
tail -n"$(($(wc -l < ~/sync/plans.txt) - $2))" ~/sync/plans.txt >> ~/plans.txt.tmp
|
||||
else
|
||||
tail -n"$(($(wc -l < ~/sync/plans.txt) - 1))" ~/sync/plans.txt > ~/plans.txt.tmp
|
||||
|
|
Loading…
Add table
Reference in a new issue