Package builtins

Class EchoCommand

java.lang.Object
builtins.EchoCommand
All Implemented Interfaces:
Command

public class EchoCommand extends Object implements Command
Implements the 'echo' builtin command.
  • Constructor Details

    • EchoCommand

      public EchoCommand()
      Constructs a new EchoCommand instance. Initializes the built-in 'echo' command.
  • Method Details

    • execute

      public Path execute(String[] args, String rawInput, Path currentDirectory)
      Prints its arguments to standard output.
      Specified by:
      execute in interface Command
      Parameters:
      args - The command and its arguments.
      rawInput - The raw input string.
      currentDirectory - The current working directory.
      Returns:
      The current directory (unchanged).