scripts/scripts/cmds/crtolf.fish

15 lines
243 B
Fish
Raw Normal View History

2019-06-16 19:35:46 -07:00
#!/usr/bin/env fish
for f in (find . -type f)
2019-07-05 19:09:01 -07:00
set ftype (file -b --mime-type "$f")
set basetype (string split "/" "$ftype")
2019-06-16 19:35:46 -07:00
2019-07-05 19:09:01 -07:00
if test "$basetype[1]" = "text"
set tmp (mktemp)
mac2unix -n "$f" "$tmp"
mv "$tmp" "$f"
end
2019-06-16 19:35:46 -07:00
end
## EOF