Create a command-line tool /app/extract that safely extracts a tar archive into a target directory. The tool…
Create a command-line tool /app/extract that safely extracts a tar archive into a target directory. The tool…: a task in TermGrade Environments: 1,004 executable Linux tasks (Harbor dataset). Input contract: - The tool receives exactly two arguments: <archive path and <target dir - <archive path…
The task
**Input contract:** - The tool receives exactly two arguments: `<archive_path>` and `<target_dir>` - `<archive_path>` is a path to a tar archive (can be `.tar`, `.tar.gz`, `.tar.bz2`, `.tar.xz`) - `<target_dir>` is a directory that must exist before extraction
Part of ai-and/termgrade-environments.