question: @ Override public boolean executeScriptLine ( final String line ) { boolean success = false ; String withPropsExpanded = line ; try { if ( line . contains ( "$" ) ) { withPropsExpanded = expandProperties ( line ) ; } String logMessage = "Command String to execute .. " ; if ( ! line . equals ( withPropsExpanded ) ) { if ( ! isQuietMode ( ) ) { Gfsh . println ( "Post substitution: " + withPropsExpanded ) ; } logMessage = "Command String after substitution : " ; expandedPropCommandsMap . put ( withPropsExpanded , line ) ; } if ( gfshFileLogger . fineEnabled ( ) ) { gfshFileLogger . fine ( logMessage + withPropsExpanded ) ; } success = super . executeScriptLine ( withPropsExpanded ) ; } catch ( Exception e ) { setLastExecutionStatus ( - 1 ) ; } finally { gfshHistory . setAutoFlush ( true ) ; gfshHistory . addToHistory ( line ) ; gfshHistory . setAutoFlush ( false ) ; expandedPropCommandsMap . clear ( ) ; } return success ; }
target:  Executes the given command string. We have over-ridden the behavior to extend the original implementation to store the 'last command execution status'.