Skip to content

Commit ce09400

Browse files
committed
get_shell: use strtrim for portability
1 parent a122fd3 commit ce09400

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

+stdlib/get_shell.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77
cmd = "(dir 2>&1 *`|echo CMD);&<# rem #>echo ($PSVersionTable).PSEdition";
88
else
99
% https://askubuntu.com/a/1349538
10-
cmd = strcat("lsof -p ", '"$$"', " | grep -m 1 txt | xargs -n 1 | tail -n +9 | tr -d [:space:]");
10+
cmd = strcat("lsof -p ", '"$$"', " | grep -m 1 txt | xargs -n 1 | tail -n +9");
1111
end
1212

1313
[r, msg] = system(cmd);
1414

1515
if r == 0
16-
s = msg;
16+
s = strtrim(msg);
1717
else
1818
s = getenv("SHELL");
1919
end

0 commit comments

Comments
 (0)