HF RL Explorer

Task: Remove Trailing Newline from a File

Task: Remove Trailing Newline from a File: a task in Terminal-Lego-15k (Harbor dataset). Write a shell script that removes the last character of a file only if it is a newline ( \n ). If the file does not end with a newline, it should remain unchanged.

Part of PrimeIntellect/Terminal-Lego-15k.