scripts/scripts/cmds/crtolf.fish

15 lines
243 B
Fish
Executable File

#!/usr/bin/env fish
for f in (find . -type f)
set ftype (file -b --mime-type "$f")
set basetype (string split "/" "$ftype")
if test "$basetype[1]" = "text"
set tmp (mktemp)
mac2unix -n "$f" "$tmp"
mv "$tmp" "$f"
end
end
## EOF