HF RL Explorer

Task: Get the Last Character of a String in Shell

Task: Get the Last Character of a String in Shell: a task in Terminal-Lego-15k (Harbor dataset). Write a shell script that correctly extracts and prints the last character of any string passed as an argument. The script must handle special characters properly, including those that have special…

The task

Write a shell script that correctly extracts and prints the last character of any string passed as an argument. The script must handle special characters properly, including those that have special meaning in shell (such as `*`, `?`, `$`, etc.).

Part of PrimeIntellect/Terminal-Lego-15k.