diff --git a/bin/engridFoam b/bin/engridFoam index 076f34ddee..6384c365e2 100755 --- a/bin/engridFoam +++ b/bin/engridFoam @@ -3,7 +3,7 @@ # ========= | # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | -# \\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd. +# \\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd. # \\/ M anipulation | #------------------------------------------------------------------------------- # License @@ -30,6 +30,7 @@ # #------------------------------------------------------------------------------ usage() { + exec 1>&2 while [ "$#" -ge 1 ]; do echo "$1"; shift; done cat<&2; shift; done - cat <&2 + exec 1>&2 + while [ "$#" -ge 1 ]; do echo "$1"; shift; done + cat <&2; shift; done - cat <&2 + exec 1>&2 + while [ "$#" -ge 1 ]; do echo "$1"; shift; done + cat <&2 while [ "$#" -ge 1 ]; do echo "$1"; shift; done cat< diff --git a/bin/foamExec b/bin/foamExec index 47a2428ccd..26ad311349 100755 --- a/bin/foamExec +++ b/bin/foamExec @@ -39,6 +39,7 @@ # foamEtcFile #------------------------------------------------------------------------------ usage() { + exec 1>&2 while [ "$#" -ge 1 ]; do echo "$1"; shift; done cat<&2 while [ "$#" -ge 1 ]; do echo "$1"; shift; done cat<&2 while [ "$#" -ge 1 ]; do echo "$1"; shift; done cat <&2 while [ "$#" -ge 1 ]; do echo "$1"; shift; done cat< {args} diff --git a/bin/foamNewCase b/bin/foamNewCase index 52cd516bb6..fda86b4bdd 100755 --- a/bin/foamNewCase +++ b/bin/foamNewCase @@ -3,7 +3,7 @@ # ========= | # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | -# \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd. +# \\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd. # \\/ M anipulation | #------------------------------------------------------------------------------- # License @@ -37,6 +37,7 @@ templateDir="appTemplates" #------------------------------------------------------------------------------ usage() { + exec 1>&2 while [ "$#" -ge 1 ]; do echo "$1"; shift; done cat<&2; shift; done -cat <&2 + exec 1>&2 + while [ "$#" -gt 0 ]; do echo "$1"; shift; done +cat < specify alternative output directory diff --git a/bin/foamPackBin b/bin/foamPackBin index 1aee24cadf..36614ab781 100755 --- a/bin/foamPackBin +++ b/bin/foamPackBin @@ -54,8 +54,9 @@ esac usage() { - while [ $# -gt 0 ]; do echo "$1" 1>&2; shift; done -cat <&2 + exec 1>&2 + while [ "$#" -gt 0 ]; do echo "$1"; shift; done +cat < ${0##*/} [OPTION] -current options: diff --git a/bin/foamPackDeps b/bin/foamPackDeps index d0c6552122..ab663a04c4 100755 --- a/bin/foamPackDeps +++ b/bin/foamPackDeps @@ -52,8 +52,9 @@ esac usage() { - while [ $# -gt 0 ]; do echo "$1" 1>&2; shift; done -cat <&2 + exec 1>&2 + while [ "$#" -gt 0 ]; do echo "$1"; shift; done +cat <&2; shift; done -cat <&2 + exec 1>&2 + while [ "$#" -gt 0 ]; do echo "$1"; shift; done +cat <&2; shift; done -cat <&2 + exec 1>&2 + while [ "$#" -gt 0 ]; do echo "$1"; shift; done +cat < ${0##*/} [OPTION] -current options: diff --git a/bin/foamPackThirdParty b/bin/foamPackThirdParty index 37625b42cd..bb7c0f6d78 100755 --- a/bin/foamPackThirdParty +++ b/bin/foamPackThirdParty @@ -33,8 +33,9 @@ packDir=ThirdParty-$WM_PROJECT_VERSION toolsDir="${0%/*}/tools" # this script is located in the tools/ parent dir usage() { - while [ $# -gt 0 ]; do echo "$1" 1>&2; shift; done -cat <&2 + exec 1>&2 + while [ "$#" -gt 0 ]; do echo "$1"; shift; done +cat < specify alternative output directory diff --git a/bin/foamUpdateCaseFileHeader b/bin/foamUpdateCaseFileHeader index 92d856f749..afc32cf151 100755 --- a/bin/foamUpdateCaseFileHeader +++ b/bin/foamUpdateCaseFileHeader @@ -3,7 +3,7 @@ # ========= | # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | -# \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. +# \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. # \\/ M anipulation | #------------------------------------------------------------------------------ # License @@ -33,6 +33,7 @@ # #------------------------------------------------------------------------------ usage() { + exec 1>&2 while [ "$#" -ge 1 ]; do echo "$1"; shift; done cat<&2 while [ "$#" -ge 1 ]; do echo "$1"; shift; done cat< #------------------------------------------------------------------------------ usage() { + exec 1>&2 while [ "$#" -ge 1 ]; do echo "$1"; shift; done - cat<&2 + cat< diff --git a/bin/rmdepold b/bin/rmdepold index 01197eb04f..bb83bbd9b6 100755 --- a/bin/rmdepold +++ b/bin/rmdepold @@ -3,7 +3,7 @@ # ========= | # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | -# \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. +# \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd. # \\/ M anipulation | #------------------------------------------------------------------------------- # License @@ -34,8 +34,9 @@ # - optionally remove empty directories #------------------------------------------------------------------------------ usage() { + exec 1>&2 while [ "$#" -ge 1 ]; do echo "$1"; shift; done - cat<&2 + cat<&2 while [ "$#" -ge 1 ]; do echo "$1"; shift; done cat<&2 while [ "$#" -ge 1 ]; do echo "$1"; shift; done cat<&2 while [ "$#" -ge 1 ]; do echo "$1"; shift; done cat<&2 while [ "$#" -ge 1 ]; do echo "$1"; shift; done cat<