Update convert.sh
[LoveSoStrong.git] / data / convert.sh
blobcdc00e978455a7a72aa3ed05796030a51c1e7aae
1 #!/usr/bin/env bash
3 # Loop over all files with the _lf.txt suffix
4 for file in *_lf.txt; do
5 # Extract the base name without the _lf.txt suffix
6 base_name="${file%_lf.txt}"
8 # Convert to CRLF (Windows-style) line endings
9 unix2dos -n "$file" "${base_name}_crlf.txt"
11 # Convert to CR (Mac-style) line endings
12 unix2mac -n "$file" "${base_name}_cr.txt"
13 done
15 echo "Conversion completed!"