Previous Topic: OSRedirect.OSRedirect ConstructorNext Topic: OSRedirect.errorOccurred Method


OSRedirect.clear Method

This method resets the output and error output buffers of OSRedirect() objects. The method is called internally by the ! and !! commands, so there is no need to call it explicitly when using the same OSRedirect() instance in multiple OS invocations.

This method has the following syntax:

clear()

The method does not return a value.

Example

out = new OSRedirect();
! ping ascli1 -output out
? out.output();
out.clear();
? out.output();   // Empty output

See also:

! Command--Invoke Command or Child Process (Cmdlet)

!! Command--Invoke Command or Child Process and Auto-capture Output (Cmdlet)