aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2022-01-18 12:44:51 -0300
committerEuAndreh <eu@euandre.org>2022-01-18 14:03:01 -0300
commit8a287a5d64021d52d04e682ccf4564fc399f1beb (patch)
tree9c55aaf0399cfdf2ef88d45e72edfb44bd957226
parentsrc/td.in: Add optimal_line_for_type() (diff)
downloadtd-8a287a5d64021d52d04e682ccf4564fc399f1beb.tar.gz
td-8a287a5d64021d52d04e682ccf4564fc399f1beb.tar.xz
src/td.in: separate flag from string option in "head" and "tail" commands
-rwxr-xr-xsrc/td.in4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/td.in b/src/td.in
index ecc19c8..5262d8e 100755
--- a/src/td.in
+++ b/src/td.in
@@ -241,9 +241,9 @@ insert_at_line() {
> "$TMPF"
else
printf '%s\n\n%s\n\n%s\n' \
- "$(head "-n$N" "$F")" \
+ "$(head -n "$N" "$F")" \
"$(cat -)" \
- "$(tail "-n+$((N+1))" "$F")" \
+ "$(tail -n +$((N+1)) "$F")" \
> "$TMPF"
fi