Skip to content

Commit

Permalink
Add replacetabs.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
gergap committed Aug 24, 2016
1 parent 86faf63 commit c46464e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions replacetabs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh

for file in $*; do
# replace tabs with 4 spaces
cat "$file" | sed -e "s/\t/ /g" > tmp
# add missing CR at end of file
cat tmp | sed -e "$ s/\(.\)$/\\1\\n/" > "$file"
done

0 comments on commit c46464e

Please sign in to comment.