Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
Acme.Sh
Commits
c5f2df5c
Commit
c5f2df5c
authored
Apr 17, 2016
by
neil
Browse files
fix compatible for sh. head -n -1 is not supported on pfsense.
parent
cada9dc0
Changes
1
Hide whitespace changes
Inline
Side-by-side
acme.sh
View file @
c5f2df5c
...
...
@@ -194,7 +194,7 @@ _getfile() {
_err
"Can not find start line:
$startline
"
return
1
fi
i
=
"
$(
_math
$i
+ 1
)
"
_debug i
$i
j
=
"
$(
grep
-n
--
"
$endline
"
$filename
|
cut
-d
:
-f
1
)
"
...
...
@@ -202,10 +202,10 @@ _getfile() {
_err
"Can not find end line:
$endline
"
return
1
fi
j
=
"
$(
_math
$j
- 1
)
"
_debug j
$j
sed
-n
$i
,
${
j
}
p
"
$filename
"
|
head
-n
-1
|
tail
-n
+2
sed
-n
$i
,
${
j
}
p
"
$filename
"
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment