Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
ディレクトリ内のすべての .html ファイルを再帰的に反復処理し、bash スクリプトを使用してそれらを .jade に変換しようとしています。
#!/bin/bash for f in ./*.html ./**/*.html ; do cat $f | html2jade -d > $f + '.jade'; done;
当然、$f + '.html'ビットは正しくありません。どうすればこれを修正できますか?
$f + '.html'
#!/bin/bash shopt -s globstar for f in **/*.html; do html2jade -d < "$f" > "${f%.html}.jade" done
ほとんどの場合、連結がデフォルトです。
... > "$f.jade"
また:
html2jade ... < "$f"
と:
... > "${f%.html}.jade"