Index: ../trunk-jpl/src/m/os/oshostname.m
===================================================================
--- ../trunk-jpl/src/m/os/oshostname.m	(revision 13731)
+++ ../trunk-jpl/src/m/os/oshostname.m	(revision 13732)
@@ -6,17 +6,18 @@
 %
 
 if ispc(),
-	[status,hostname]=system('hostname | sed ''s/-//g''');hostname=hostname(1:end-1);
-
+	[status,hostname]=system('hostname | sed ''s/-//g''');
 	if status, 
 		error('oshostname error message: could not run hostname command on windows os');
 	end
-
 else
 	[status,hostname]=system(['hostname -s | sed ''s/-//g''']);
 	if status, 
 		error('oshostname error message: could not run hostname command on *nix os');
 	end
-	hostname=hostname(1:end-1);
-	hostname=ddewhite(hostname);
+
 end
+
+%remove carriage return and blank spaces
+hostname=hostname(1:end-1);
+hostname=ddewhite(hostname);
