HF RL Explorer

Task: Detect if a Bash/Ksh Script is Being Sourced

Task: Detect if a Bash/Ksh Script is Being Sourced: a task in Terminal-Lego-15k (Harbor dataset). Create a shell script that can reliably detect whether it is being sourced (using source or . command) or executed directly (as a standalone script).

The task

Create a shell script that can reliably detect whether it is being **sourced** (using `source` or `.` command) or **executed directly** (as a standalone script).

Part of PrimeIntellect/Terminal-Lego-15k.