BUG: Preserve face zone orientation (fvMeshSubset, removeCels, addPatchCellLayer)
[OpenFOAM-1.6.x.git] / bin / tools / replaceAllShellSun
blob6c9fc5b70a1744dc442bffe9103b673a02231302
1 #!/usr/xpg4/bin/sh
3 # Replace all shell script headers with
4 if [ $# -ne 1 -o ! -d "$1" ]; then
5 echo "Usage: `basename $0` <dir>"
6 echo ""
7 echo "Replaces all occurrences of #!/bin/sh with #!/usr/xpg4/bin/sh inside a directory tree."
8 exit 1
9 fi
11 #- note that below does not work since {} does not get replaced
12 #find $1 -type f -exec /usr/xpg4/bin/sh -c "grep '^#\!/bin/sh' {} >/dev/null && echo {} && mv {} {}_bak && sed -e 's@^#\!/bin/sh@#\!/usr/xpg4/bin/sh@' {}_bak > {}" ';'
14 find $1 -exec $WM_PROJECT_DIR/bin/tools/inlineReplace '^#\!/bin/sh' '#\!/usr/xpg4/bin/sh' {} \; -print