Index: /issm/trunk-jpl/scripts/ol.m
===================================================================
--- /issm/trunk-jpl/scripts/ol.m	(revision 24855)
+++ /issm/trunk-jpl/scripts/ol.m	(revision 24856)
@@ -1,15 +1,24 @@
+function ol(varargin)
 
-%Open runme.m file and read line by line
-fid=fopen('runme.m','r');
+	options=pairoptions(varargin{:});
 
-tline = fgets(fid);
-count=1;
-while ischar(tline)
+	range=getfieldvalue(options,'<',Inf);
+
+	%Open runme.m file and read line by line
+	fid=fopen('runme.m','r');
+
 	tline = fgets(fid);
-	if strncmpi(tline,'if perform(org,',14),
-		lastchar = strfind(tline,')');
-		lastchar = lastchar(end)-1;
-		disp(sprintf('%2i: %s',count,tline(16:lastchar)));
-		count=count+1;
+	count=1;
+	while ischar(tline)
+		tline = fgets(fid);
+		if strncmpi(tline,'if perform(org,',14),
+			lastchar = strfind(tline,')');
+			lastchar = lastchar(end)-1;
+			disp(sprintf('%2i: %s',count,tline(16:lastchar)));
+			if count>range,
+				break;
+			end
+			count=count+1;
+		end
 	end
-end
+	fclose(fid);
