Task 5: xargs

  1. Modify xargs to run the command with a maximum of one argument at a time (like xargs -n 1).

  2. Change the input delimiter from a newline (\n) to a semicolon (;) or a comma.

  3. Add a "verbose" mode that prints the full command string to be executed before the fork().

  4. Modify xargs to ignore and skip any lines in the input that are completely empty.

  5. Implement a version that prepends the input line to the command arguments instead of appending it.

  6. Update xargs to exit immediately if any child process returns a non-zero exit status.

  7. Modify the program to read input from a specific file path instead of the standard input.

  8. Implement a "dry-run" mode that only prints what it would execute without actually calling exec.

  9. Change xargs to wait for all child processes to finish before the parent itself exits.

  10. Modify the logic to handle a maximum of 3 arguments per input line.

Last updated