HF RL Explorer

Task: Check if Passed Argument is File or Directory in Bash

Task: Check if Passed Argument is File or Directory in Bash: a task in Terminal-Lego-15k (Harbor dataset). Write a Bash script that correctly identifies whether a passed argument is a file or a directory. The script must properly handle paths containing spaces and other special characters that…

The task

Write a Bash script that correctly identifies whether a passed argument is a file or a directory. The script must properly handle paths containing spaces and other special characters that require escaping.

Part of PrimeIntellect/Terminal-Lego-15k.