Changeset 16957
- Timestamp:
- 11/26/13 15:18:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/os/oshostname.m
r15121 r16957 7 7 8 8 if ispc(), 9 [status,hostname]=system('hostname ');9 [status,hostname]=system('hostname < /dev/null'); 10 10 if status, 11 11 error('oshostname error message: could not run hostname command on windows os'); 12 12 end 13 13 else 14 [status,hostname]=system(['hostname -s | sed ''s/-//g''']); 14 %See http://www.mathworks.com/help/matlab/ref/system.html "tips" section 15 %We need to add < /dev/null otherwise what is in the clipboard is added 16 [status,hostname]=system('hostname < /dev/null'); 17 hostname = strrep(hostname,'-','') 15 18 if status, 16 19 error('oshostname error message: could not run hostname command on *nix os'); 17 20 end 18 19 21 end 20 22
Note:
See TracChangeset
for help on using the changeset viewer.