[gedit-list] external tools: swallow the last line



Hello, everyone,

	I need a script to number the selected text, that is, to make a
	numbered list.

	I tried the following script code with options: input="current
	selection" and output="replace current selection". Then I found
	the last line was removed after running script.

#!/bin/sh
# linecount=1
while read line
do
#	echo ${linecount}. $line
#	linecount=$[$linecount+1]
	echo $line
done
exit 0



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]