# Edit this Script to custom the filter: AWK Script 1
# Edite este "Script" para personalizar o comportamento do filtro: Script AWK 1 

BEGIN { 

# Constants
	TRUE = 1;
	FALSE = 0;
	
# Variables
	lineCounter = 0;
}

#####################################
# Edit this function to add a logic
# to consider or discard a line.
#####################################
function preTreatEachLine (line) {

		considerLine = TRUE;
		
# Add pre treatment logic here.
		
        return considerLine;
}


{ 

# Store all lines in an array.
	considerThisLine = preTreatEachLine($0);
	if (considerThisLine) {
		lines[++lineCounter] = $0;
	}
}

function workWithCharactersOfALine(line) {

	for(j = 1; j <= length(line); j++) {
		character = substr(line, j, 1)
		print character;
	}
	
}

#####################################
# Edit this function to work with the 
# entire text in the array "lines".
#####################################
function workWithEntireTextAtOnce() {

	secondLineCounter = 1;
	
	for (i = 1; i <= lineCounter; i++) {
#		workWithCharactersOfALine(lines[i]);
		printf ("%d-%s\n", i, lines[i]);
	}

}

END {

	workWithEntireTextAtOnce();

}

