-
Notifications
You must be signed in to change notification settings - Fork 744
Closed
Labels
bash compatCompatibility issues with bash or POSIX behaviorCompatibility issues with bash or POSIX behaviorfixBug/defect, or a fix for such a problemBug/defect, or a fix for such a problem
Description
Node version (or tell us if you're using electron or some other framework):
all
ShellJS version (the most recent version/Github branch you see the bug on):
master
Operating system:
all
Description of the bug:
shell.tail doesn't support +<num> correctly. While it's true negative numbers should be treated the same as sign-less numbers (ex. tail -n -10 means "print last 10 lines of file"), numbers with a + sign mean to print that numbered line and all lines following. So tail -n +2 file.txt means "print all lines except the first line."
Example ShellJS command to reproduce the error:
$ shx tail -n +10 file_with_11_lines.txt
2
3
4
5
6
7
8
9
10
11
$ tail -n +10 file_with_11_lines.txt
10
11Metadata
Metadata
Assignees
Labels
bash compatCompatibility issues with bash or POSIX behaviorCompatibility issues with bash or POSIX behaviorfixBug/defect, or a fix for such a problemBug/defect, or a fix for such a problem