HF RL Explorer

Task: Getting the Parent Directory of a Path in Bash

Task: Getting the Parent Directory of a Path in Bash: a task in Terminal-Lego-15k (Harbor dataset). Write a Bash script that extracts the parent directory from a given file path. The script should handle paths both with and without trailing slashes.

The task

Write a Bash script that extracts the parent directory from a given file path. The script should handle paths both with and without trailing slashes.

Part of PrimeIntellect/Terminal-Lego-15k.