Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
retab
#!/bin/sh
# retab a list of files from 2 spaces to 4 spaces
# todo: read the list of files from a file
for i in \
client/scripts/components/describe.jsx \
client/scripts/components/includes/header.jsx \
client/scripts/components/index.jsx \
client/scripts/components/layouts/default.jsx \
client/scripts/components/modules/error.jsx \
client/scripts/components/modules/file_upload.jsx \
client/scripts/components/modules/link.jsx \
client/scripts/components/modules/pictureBox.jsx \
client/scripts/components/modules/product.jsx \
client/scripts/components/modules/profile.jsx \
client/scripts/components/product.jsx
do
sed -e 's/^/~/' -e ': r' -e 's/^\( *\)~ /\1 ~/' -e 't r' -e 's/~//' "${i}" > temp.notabs && mv temp.notabs "${i}"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment