Below is a piece of script used to capture rows of a terminal session.
I'm looking for a way to have the code listed below check the 2nd character of each row to make sure it is NOT blank - if it is a blank character I do not want that row captured into the TXT file... I would like to skip the entire row and move to the next.
One other enhancement I'm trying to make during the screen capture process is replace any instance of the | (pipe) character with a comma so it opens up neatly in Excel. The pipe character is used to separate data elements.
Thank you!
I'm looking for a way to have the code listed below check the 2nd character of each row to make sure it is NOT blank - if it is a blank character I do not want that row captured into the TXT file... I would like to skip the entire row and move to the next.
One other enhancement I'm trying to make during the screen capture process is replace any instance of the | (pipe) character with a comma so it opens up neatly in Excel. The pipe character is used to separate data elements.
Thank you!
Code:
proc page1
string Line ; Line to write to file.
integer Row ; Current row to get.
pause 3
if fopen 1 "C:\SUMMARY.csv" APPEND
for Row = 0 upto 20 ; Loop through each row
termgets Row 0 Line 79 ; Get line specified by row.
fputs 1 Line ; Write line
fputs 1 "`r"
endfor
fclose 1 ; Close file opened for create.
else
errormsg "Couldn't open file!"
endif
endproc