Skip to content

Instantly share code, notes, and snippets.

@sugamasao
Created November 11, 2010 02:43
Show Gist options
  • Save sugamasao/671896 to your computer and use it in GitHub Desktop.
Save sugamasao/671896 to your computer and use it in GitHub Desktop.
#!/bin/sh
# カレントディレクトリにある erb ファイルを haml へ変換して old ディレクトリに .erb ファイルを移すワンライナー
# zsh で動作確認済み
# 要 html2haml
for file in `ls`;do;html2haml ${file} ${file%erb}haml;mkdir -p old; mv ${file} old;done
# こっちは old に移さないで消す
# for file in `ls`;do;html2haml ${file} ${file%erb}haml;rm ${file};done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment