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"
15 echo "Conversion completed!"