diff --git a/applications/utilities/miscellaneous/OSspecific/addr2line/addr2line.C b/applications/utilities/miscellaneous/OSspecific/addr2line/addr2line.C index 62177d032a..9d61aef751 100644 --- a/applications/utilities/miscellaneous/OSspecific/addr2line/addr2line.C +++ b/applications/utilities/miscellaneous/OSspecific/addr2line/addr2line.C @@ -186,7 +186,7 @@ std::string getLine(const std::string& filename, const std::string& addr) + "' -o '" + "target module load -f " + filename - + " __TEXT 0x0' 2> /dev/null" + + " __TEXT 0x0' 2>/dev/null" + " | grep LineEntry" ); diff --git a/bin/foamCreateVideo b/bin/foamCreateVideo index dde21ea818..56a3f09cb8 100755 --- a/bin/foamCreateVideo +++ b/bin/foamCreateVideo @@ -7,7 +7,7 @@ # \\/ M anipulation | #------------------------------------------------------------------------------ # Copyright (C) 2015-2016 OpenFOAM Foundation -# Copyright (C) 2018 OpenCFD Ltd. +# Copyright (C) 2018-2019 OpenCFD Ltd. #------------------------------------------------------------------------------ # License # This file is part of OpenFOAM. @@ -138,7 +138,7 @@ do -webm) # webm - needs avconv outputFormat=webm - command -v avconv >/dev/null 2>&1 || \ + command -v avconv >/dev/null || \ die "webm format requires avconv, which was not found." ;; -*) @@ -168,7 +168,7 @@ echo if [ "$outputFormat" = webm ] then - if command -v avconv >/dev/null 2>&1 + if command -v avconv >/dev/null then echo "Creating video with avconv..." avconv \ @@ -180,7 +180,7 @@ then die "webm format requires avconv, which was not found." fi else - if command -v avconv >/dev/null 2>&1 + if command -v avconv >/dev/null then echo "Creating video with avconv..." avconv \ @@ -189,7 +189,7 @@ else -c:v libx264 -pix_fmt yuv420p \ "$outputPrefix.$outputFormat" - elif command -v mencoder >/dev/null 2>&1 + elif command -v mencoder >/dev/null then echo "Creating video with mencoder..." mencoder \ diff --git a/bin/foamInstallationTest b/bin/foamInstallationTest index cac233093a..326705c6d0 100755 --- a/bin/foamInstallationTest +++ b/bin/foamInstallationTest @@ -241,7 +241,7 @@ reportExecutable() | sed -ne 's/flex \([0-9][0-9.]*\).*/\1/p') ;; wmake) - VERSION="$(wmake -show-api 2> /dev/null)" + VERSION="$(wmake -show-api 2>/dev/null)" ;; *gcc* | *g++*) VERSION=$($APP_NAME -v 2>&1 \ diff --git a/bin/foamLog b/bin/foamLog index 1ba7d0a82f..318dc6a268 100755 --- a/bin/foamLog +++ b/bin/foamLog @@ -296,7 +296,7 @@ say # Generate Awk program #----------------------------- -rm -f $AWKFILE 2> /dev/null +rm -f $AWKFILE cat << AWK_CONTENTS > $AWKFILE # Awk script for OpenFOAM log file extraction BEGIN { diff --git a/bin/paraFoam b/bin/paraFoam index 2b2bbfc305..ecd01ae466 100755 --- a/bin/paraFoam +++ b/bin/paraFoam @@ -226,7 +226,7 @@ proc*) for i in processor* do ( - cd "$i" 2> /dev/null && touch "${caseFile%.*}#${i#processor}.$extension" + cd "$i" 2>/dev/null && touch "${caseFile%.*}#${i#processor}.$extension" ) done echo "Created '$caseFile' for processor directories" 1>&2 diff --git a/bin/tools/CleanFunctions b/bin/tools/CleanFunctions index ca8abf0b6b..3f126a4c07 100644 --- a/bin/tools/CleanFunctions +++ b/bin/tools/CleanFunctions @@ -6,7 +6,7 @@ # \\/ M anipulation | #------------------------------------------------------------------------------ # Copyright (C) 2011-2016 OpenFOAM Foundation -# Copyright (C) 2015-2018 OpenCFD Ltd. +# Copyright (C) 2015-2019 OpenCFD Ltd. #------------------------------------------------------------------------------ # License # This file is part of OpenFOAM, licensed under GNU General Public License @@ -27,14 +27,14 @@ cleanTimeDirectories() while [ ${#zeros} -lt 8 ] do timeDir="0.${zeros}[1-9]*" - rm -rf ./${timeDir} ./-${timeDir} > /dev/null 2>&1 + rm -rf ./${timeDir} ./-${timeDir} zeros="0$zeros" done rm -rf \ ./[1-9]* ./-[1-9]* ./log ./log.* ./log-* ./logSummary.* \ ./.fxLock ./*.xml ./ParaView* ./paraFoam* \ ./*.blockMesh ./*.foam ./*.OpenFOAM \ - ./.setSet > /dev/null 2>&1 + ./.setSet } @@ -42,7 +42,7 @@ cleanAdiosOutput() { if [ -d adiosData ] && [ -d system ] then - rm -rf adiosData > /dev/null 2>&1 + rm -rf adiosData fi } @@ -51,7 +51,7 @@ cleanDynamicCode() { if [ -d dynamicCode ] && [ -d system ] then - rm -rf dynamicCode > /dev/null 2>&1 + rm -rf dynamicCode fi } @@ -63,23 +63,23 @@ cleanSnappyFiles() constant/polyMesh/pointLevel \ constant/polyMesh/refinementHistory \ constant/polyMesh/level0Edge \ - constant/polyMesh/surfaceIndex > /dev/null 2>&1 + constant/polyMesh/surfaceIndex rm -f \ processor*/constant/polyMesh/cellLevel \ processor*/constant/polyMesh/pointLevel \ processor*/constant/polyMesh/refinementHistory \ processor*/constant/polyMesh/level0Edge \ - processor*/constant/polyMesh/surfaceIndex > /dev/null 2>&1 + processor*/constant/polyMesh/surfaceIndex rm -f \ constant/cellLevel \ constant/pointLevel \ 0/cellLevel \ - 0/pointLevel > /dev/null 2>&1 + 0/pointLevel rm -f \ processor*/constant/cellLevel \ processor*/constant/pointLevel \ processor*/0/cellLevel \ - processor*/0/pointLevel > /dev/null 2>&1 + processor*/0/pointLevel } @@ -92,11 +92,11 @@ cleanOptimisation() cleanPostProcessing() { - rm -rf Ensight EnSight ensightWrite insitu VTK > /dev/null 2>&1 - rm -rf postProcessing > /dev/null 2>&1 - rm -rf postProcessing-dry-run > /dev/null 2>&1 - rm -rf cuttingPlane > /dev/null 2>&1 - rm -rf surfaceSampling > /dev/null 2>&1 + rm -rf Ensight EnSight ensightWrite insitu VTK + rm -rf postProcessing + rm -rf postProcessing-* + rm -rf cuttingPlane + rm -rf surfaceSampling } @@ -108,19 +108,19 @@ cleanCase() cleanDynamicCode cleanOptimisation - rm -rf processor* > /dev/null 2>&1 - rm -rf TDAC > /dev/null 2>&1 - rm -rf probes* > /dev/null 2>&1 - rm -rf forces* > /dev/null 2>&1 - rm -rf graphs* > /dev/null 2>&1 - rm -rf sets > /dev/null 2>&1 - rm -rf system/machines > /dev/null 2>&1 + rm -rf processor* + rm -rf TDAC + rm -rf probes* + rm -rf forces* + rm -rf graphs* + rm -rf sets + rm -rf system/machines # From mpirunDebug rm -f gdbCommands mpirun.schema cleanSnappyFiles - rm -f 0/cellDist > /dev/null 2>&1 + rm -f 0/cellDist ( cd constant 2>/dev/null || exit 0 @@ -128,13 +128,13 @@ cleanCase() rm -rf \ cellDecomposition cellToRegion cellLevel* pointLevel* \ tetDualMesh \ - > /dev/null 2>&1 + ; # Old constant/polyMesh location for blockMeshDict still in use? # - emit a gentle warning if [ -e polyMesh/blockMeshDict.m4 ] then - rm -f polyMesh/blockMeshDict > /dev/null 2>&1 + rm -f polyMesh/blockMeshDict echo echo "Warning: not removing constant/polyMesh/ " echo " it contains a blockMeshDict, which should normally be under system/ instead" @@ -147,13 +147,13 @@ cleanCase() echo else # Remove polyMesh entirely if there is no blockMeshDict - rm -rf polyMesh > /dev/null 2>&1 + rm -rf polyMesh fi ) if [ -e system/blockMeshDict.m4 ] then - rm -f system/blockMeshDict > /dev/null 2>&1 + rm -f system/blockMeshDict fi } @@ -175,24 +175,22 @@ removeCase() cleanSamples() { - rm -rf sets samples sampleSurfaces > /dev/null 2>&1 + rm -rf sets samples sampleSurfaces } cleanUcomponents() { - rm -rf 0/Ux 0/Uy 0/Uz > /dev/null 2>&1 + rm -rf 0/Ux 0/Uy 0/Uz } cleanFaMesh () { - ( - cd constant/faMesh 2>/dev/null && \ - rm -rf \ - faceLabels* faBoundary* \ - > /dev/null 2>&1 \ - ) + rm -rf \ + constant/faMesh/faceLabels* \ + constant/faMesh/faBoundary* \ + ; } diff --git a/bin/tools/LogFunctions b/bin/tools/LogFunctions index 4e2c2b02a8..50de322e36 100644 --- a/bin/tools/LogFunctions +++ b/bin/tools/LogFunctions @@ -5,7 +5,7 @@ # \\ / A nd | www.openfoam.com # \\/ M anipulation | #------------------------------------------------------------------------------ -# Copyright (C) 2017 OpenCFD Ltd. +# Copyright (C) 2017-2019 OpenCFD Ltd. #------------------------------------------------------------------------------ # License # This file is part of OpenFOAM, licensed under GNU General Public License @@ -73,7 +73,7 @@ logReport() collectLogs() { echo "Collecting log files..." 1>&2 - rm -f logs testLoopReport > /dev/null 2>&1 + rm -f logs testLoopReport touch logs testLoopReport local appDir log logFiles @@ -115,7 +115,7 @@ removeLogs() -name '*.pvs' -o -name '*.foam' -o -name '*.OpenFOAM' \ \) -type f -delete - rm -f logs testLoopReport > /dev/null 2>&1 + rm -f logs testLoopReport } diff --git a/bin/tools/RunFunctions b/bin/tools/RunFunctions index 71f097a983..8adacd7356 100644 --- a/bin/tools/RunFunctions +++ b/bin/tools/RunFunctions @@ -434,7 +434,7 @@ restore0Dir() ( echo "Filter #include directives in processors/0:" \cd processors/0 2>/dev/null || exit 0 - for file in $(grep -l "#include" * 2> /dev/null) + for file in $(grep -l "#include" * 2>/dev/null) do foamDictionary "$file" > "$file.$$." && mv "$file.$$." "$file" echo " $file" diff --git a/bin/tools/foamCreateCompletionCache b/bin/tools/foamCreateCompletionCache index 81f7244a90..d4d060504d 100755 --- a/bin/tools/foamCreateCompletionCache +++ b/bin/tools/foamCreateCompletionCache @@ -204,7 +204,7 @@ do do extractOptions $appName done - elif command -v "$item" > /dev/null 2>&1 + elif command -v "$item" >/dev/null then extractOptions $item else diff --git a/bin/tools/foamCreateManpage b/bin/tools/foamCreateManpage index 5eb763713b..615a16208a 100755 --- a/bin/tools/foamCreateManpage +++ b/bin/tools/foamCreateManpage @@ -128,7 +128,7 @@ then [ -d "$outputDir" ] && [ -w "$outputDir" ] || \ die "Cannot write to $outputDir" "Not a directory, or no permission?" else - mkdir -p "$outputDir" 2> /dev/null || \ + mkdir -p "$outputDir" 2>/dev/null || \ die "Cannot create directory: $outputDir" fi @@ -138,7 +138,7 @@ echo 1>&2 # Use a tmp file so that we confirm that the content was # generated and looks somewhat like a manpage (has a SYNOPSIS) tmpFile="$outputDir/${0##*/}-tmp$$" -trap "rm -fv $tmpFile >/dev/null; exit 0" EXIT TERM INT +trap "rm -fv $tmpFile 2>/dev/null; exit 0" EXIT TERM INT # Any special filter requirements? @@ -148,12 +148,12 @@ outputExt="1" case "$outputType" in pdf) outputExt="pdf" - command -v groff > /dev/null || die "Missing program: groff" - command -v ps2pdf > /dev/null || die "Missing program: ps2pdf" + command -v groff >/dev/null || die "Missing program: groff" + command -v ps2pdf >/dev/null || die "Missing program: ps2pdf" ;; gz) outputExt="1.gz" - command -v gzip > /dev/null || die "Missing program: gzip" + command -v gzip >/dev/null || die "Missing program: gzip" ;; esac @@ -212,7 +212,7 @@ do do process $appName done - elif command -v "$item" > /dev/null 2>&1 + elif command -v "$item" >/dev/null then process $item else diff --git a/doc/Doxygen/Allwmake b/doc/Doxygen/Allwmake index a765bc363f..9ef0dfe02c 100755 --- a/doc/Doxygen/Allwmake +++ b/doc/Doxygen/Allwmake @@ -113,8 +113,8 @@ done rm -rf latex man # Remove html directory in background -mv html html-stagedRemove$$ 2> /dev/null -rm -rf html-stagedRemove$$ >/dev/null 2>&1 & +mv html html-stagedRemove$$ 2>/dev/null +rm -rf html-stagedRemove$$ 2>/dev/null & # Ensure that created files are readable by everyone umask 22 diff --git a/etc/config.sh/CGAL b/etc/config.sh/CGAL index e5837eda8e..38014a26b4 100644 --- a/etc/config.sh/CGAL +++ b/etc/config.sh/CGAL @@ -58,7 +58,7 @@ then echo "Using CGAL ($cgal_version) -> $CGAL_ARCH_PATH" 1>&2 fi -if command -v _foamAddLibAuto > /dev/null 2>&1 # Normal sourcing (not makeCGAL) +if command -v _foamAddLibAuto >/dev/null # Normal sourcing (not makeCGAL) then _foamAddLibAuto $BOOST_ARCH_PATH lib$WM_COMPILER_LIB_ARCH _foamAddLibAuto $CGAL_ARCH_PATH lib$WM_COMPILER_LIB_ARCH diff --git a/etc/config.sh/FFTW b/etc/config.sh/FFTW index b8cc2b12d1..65e1658187 100644 --- a/etc/config.sh/FFTW +++ b/etc/config.sh/FFTW @@ -45,7 +45,7 @@ then echo "Using fftw ($fftw_version) -> $FFTW_ARCH_PATH" 1>&2 fi -if command -v _foamAddLibAuto > /dev/null 2>&1 # Normal sourcing (not makeFFTW) +if command -v _foamAddLibAuto >/dev/null # Normal sourcing (not makeFFTW) then _foamAddLibAuto $FFTW_ARCH_PATH lib$WM_COMPILER_LIB_ARCH diff --git a/etc/config.sh/adios2 b/etc/config.sh/adios2 index f49b70cab4..7f3e9e3178 100644 --- a/etc/config.sh/adios2 +++ b/etc/config.sh/adios2 @@ -32,7 +32,7 @@ then echo "Using adios ($adios2_version) -> $ADIOS2_ARCH_PATH" 1>&2 fi -if command -v _foamAddLibAuto > /dev/null 2>&1 +if command -v _foamAddLibAuto >/dev/null then # Normal sourcing (not makeAdios2) # Only add to PATH if the directory really exists diff --git a/etc/config.sh/bash_completion b/etc/config.sh/bash_completion index d70b740b2d..23805b4ae2 100644 --- a/etc/config.sh/bash_completion +++ b/etc/config.sh/bash_completion @@ -78,7 +78,7 @@ foamAddCompletion() # echo "complete ${appName##*/}" 1>&2 done - elif command -v "$appName" > /dev/null 2>&1 + elif command -v "$appName" >/dev/null then complete -o filenames -F _of_complete_ "${appName##*/}" # echo "complete ${appName##*/}" 1>&2 diff --git a/etc/config.sh/gperftools b/etc/config.sh/gperftools index bf8ca42bb1..80ea4c175c 100644 --- a/etc/config.sh/gperftools +++ b/etc/config.sh/gperftools @@ -48,7 +48,7 @@ then echo "Using gperftools ($gperftools_version) -> $GPERFTOOLS_ARCH_PATH" 1>&2 fi -if command -v _foamAddLib > /dev/null 2>&1 # Normal sourcing +if command -v _foamAddLib >/dev/null # Normal sourcing then # If GPERFTOOLS_ARCH_PATH does not end with '-system' or '-none', diff --git a/etc/config.sh/hypre b/etc/config.sh/hypre index c2639bf10b..dd0788c6d3 100644 --- a/etc/config.sh/hypre +++ b/etc/config.sh/hypre @@ -38,9 +38,9 @@ then echo "Using hypre ($hypre_version) -> $HYPRE_ARCH_PATH" 1>&2 fi -if command -v _foamAddLibAuto > /dev/null 2>&1 # Normal sourcing (not makeHYPRE) +if command -v _foamAddLibAuto >/dev/null then - + # Normal sourcing (not makeHYPRE) _foamAddLibAuto $HYPRE_ARCH_PATH unset hypre_version diff --git a/etc/config.sh/mpi b/etc/config.sh/mpi index c9ea1edafd..200b30ddbb 100644 --- a/etc/config.sh/mpi +++ b/etc/config.sh/mpi @@ -82,7 +82,7 @@ OPENMPI) fi # Could be sourced from ThirdParty with incomplete environment - if command -v _foamAddLibAuto > /dev/null 2>&1 # Normal sourcing + if command -v _foamAddLibAuto >/dev/null # Normal sourcing then _foamAddPath $MPI_ARCH_PATH/bin _foamAddMan $MPI_ARCH_PATH/share/man @@ -151,7 +151,7 @@ MPICH) export MPI_HOME=$MPI_ARCH_PATH # Could be sourced from ThirdParty with incomplete environment - if command -v _foamAddLibAuto > /dev/null 2>&1 # Normal sourcing + if command -v _foamAddLibAuto >/dev/null # Normal sourcing then _foamAddPath $MPI_ARCH_PATH/bin _foamAddMan $MPI_ARCH_PATH/share/man @@ -175,7 +175,7 @@ MVA2MPI) # MVAMPICH2 export MPI_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$FOAM_MPI # Could be sourced from ThirdParty with incomplete environment - if command -v _foamAddLibAuto > /dev/null 2>&1 # Normal sourcing + if command -v _foamAddLibAuto >/dev/null # Normal sourcing then _foamAddPath $MPI_ARCH_PATH/bin _foamAddMan $MPI_ARCH_PATH/share/man @@ -341,7 +341,7 @@ esac # Add (non-dummy) MPI implementation # - dummy MPI already in lib-path and has no external libraries -if [ "$FOAM_MPI" != dummy ] && type _foamAddLib > /dev/null 2>&1 +if [ "$FOAM_MPI" != dummy ] && command -v _foamAddLib >/dev/null then if [ -n "$FOAM_EXT_LIBBIN" ] # External libraries (allowed to be unset) then diff --git a/etc/config.sh/paraview b/etc/config.sh/paraview index ef3840e687..4027e727f8 100644 --- a/etc/config.sh/paraview +++ b/etc/config.sh/paraview @@ -201,7 +201,7 @@ esac #------------------------------------------------------------------------------ -if command -v _foamAddLib > /dev/null 2>&1 # normal sourcing +if command -v _foamAddLib >/dev/null # normal sourcing then unset ParaView_VERSION ParaView_QT fi diff --git a/etc/config.sh/paraview-system b/etc/config.sh/paraview-system index b3e37c086b..c972de3df2 100644 --- a/etc/config.sh/paraview-system +++ b/etc/config.sh/paraview-system @@ -85,7 +85,7 @@ fi #------------------------------------------------------------------------------ -if command -v _foamAddLib > /dev/null 2>&1 # normal sourcing +if command -v _foamAddLib >/dev/null # normal sourcing then unset ParaView_VERSION else diff --git a/etc/config.sh/petsc b/etc/config.sh/petsc index 3ca0ecc524..75492913ab 100644 --- a/etc/config.sh/petsc +++ b/etc/config.sh/petsc @@ -38,7 +38,7 @@ then echo "Using petsc ($petsc_version) -> $PETSC_ARCH_PATH" 1>&2 fi -if command -v _foamAddLibAuto > /dev/null 2>&1 +if command -v _foamAddLibAuto >/dev/null then # Normal sourcing (not makePETSC) diff --git a/etc/config.sh/vtk b/etc/config.sh/vtk index 161526e053..c1fd687c36 100644 --- a/etc/config.sh/vtk +++ b/etc/config.sh/vtk @@ -51,7 +51,7 @@ then echo " llvm ($mesa_llvm) $LLVM_ARCH_PATH" 1>&2 fi -if command -v _foamAddLib > /dev/null 2>&1 # normal sourcing +if command -v _foamAddLib >/dev/null # normal sourcing then # Set paths if binaries are present diff --git a/src/functionObjects/graphics/runTimePostProcessing/Allwclean b/src/functionObjects/graphics/runTimePostProcessing/Allwclean index f442961aab..68b238fabe 100755 --- a/src/functionObjects/graphics/runTimePostProcessing/Allwclean +++ b/src/functionObjects/graphics/runTimePostProcessing/Allwclean @@ -6,7 +6,7 @@ cd ${0%/*} || exit 1 # Run from this directory # This cleanup handles both cmake runTimePostProcessing and the dummy version # Cleanup library files with .so version endings -rm -f $FOAM_LIBBIN/librunTimePostProcessing* 2>/dev/null +rm -f $FOAM_LIBBIN/librunTimePostProcessing* # Cleanup generated files - remove entire top-level removeObjectDir "$PWD" diff --git a/src/functionObjects/graphics/runTimePostProcessing/Allwmake b/src/functionObjects/graphics/runTimePostProcessing/Allwmake index fecb668614..0fff1c4811 100755 --- a/src/functionObjects/graphics/runTimePostProcessing/Allwmake +++ b/src/functionObjects/graphics/runTimePostProcessing/Allwmake @@ -27,7 +27,7 @@ then depend=ignore elif [ -n "$depend" ] then - if command -v cmake > /dev/null 2>&1 + if command -v cmake >/dev/null then cmakeVersioned "$depend" $PWD || { echo diff --git a/tutorials/IO/dictionary/Allclean b/tutorials/IO/dictionary/Allclean index 46dfb893ff..c5bb819843 100755 --- a/tutorials/IO/dictionary/Allclean +++ b/tutorials/IO/dictionary/Allclean @@ -1,6 +1,7 @@ #!/bin/sh cd ${0%/*} || exit 1 # Run from this directory +#------------------------------------------------------------------------------ -rm log.* 2>/dev/null # No application, clean manually +rm -f log.* # No application, clean manually #------------------------------------------------------------------------------ diff --git a/tutorials/basic/laplacianFoam/flange/Allclean b/tutorials/basic/laplacianFoam/flange/Allclean index 71c8a0892b..7a2c8727b1 100755 --- a/tutorials/basic/laplacianFoam/flange/Allclean +++ b/tutorials/basic/laplacianFoam/flange/Allclean @@ -4,6 +4,6 @@ cd ${0%/*} || exit 1 # Run from this directory #------------------------------------------------------------------------------ cleanCase -rm -rf Fieldview > /dev/null 2>&1 +rm -rf Fieldview #------------------------------------------------------------------------------ diff --git a/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/Allrun b/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/Allrun index 1154d59847..4deed31ca5 100755 --- a/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/Allrun +++ b/tutorials/combustion/XiDyMFoam/annularCombustorTurbine/Allrun @@ -11,7 +11,7 @@ runApplication decomposePar -force runParallel potentialFoam -pName pPotential -initialiseUBCs -\rm -f processor*/0/phi +rm -f processor*/0/phi runParallel XiDyMFoam diff --git a/tutorials/combustion/XiEngineFoam/kivaTest/Allclean b/tutorials/combustion/XiEngineFoam/kivaTest/Allclean index 9dc18dc049..775a74b3d7 100755 --- a/tutorials/combustion/XiEngineFoam/kivaTest/Allclean +++ b/tutorials/combustion/XiEngineFoam/kivaTest/Allclean @@ -6,8 +6,8 @@ cd ${0%/*} || exit 1 # Run from this directory mv ./-180 temp180 cleanCase -rm -rf 0 > /dev/null 2>&1 -rm -f constant/polyMesh/boundary > /dev/null 2>&1 +rm -rf 0 +rm -f constant/polyMesh/boundary mv temp180 ./-180 diff --git a/tutorials/combustion/chemFoam/gri/validation/createGraph b/tutorials/combustion/chemFoam/gri/validation/createGraph index 1ef428f28d..6da869d4f4 100755 --- a/tutorials/combustion/chemFoam/gri/validation/createGraph +++ b/tutorials/combustion/chemFoam/gri/validation/createGraph @@ -1,6 +1,7 @@ #!/bin/sh -command -v gnuplot >/dev/null 2>&1 || { +# Require gnuplot +command -v gnuplot >/dev/null || { echo "gnuplot not found - skipping graph creation" 1>&2 exit 1 } @@ -21,4 +22,3 @@ gnuplot</dev/null 2>&1 || { +# Require gnuplot +command -v gnuplot >/dev/null || { echo "gnuplot not found - skipping graph creation" 1>&2 exit 1 } @@ -22,4 +22,3 @@ gnuplot</dev/null 2>&1 || { +# Require gnuplot +command -v gnuplot >/dev/null || { echo "gnuplot not found - skipping graph creation" 1>&2 exit 1 } @@ -22,4 +22,3 @@ gnuplot</dev/null 2>&1 || { +# Require gnuplot +command -v gnuplot >/dev/null || { echo "gnuplot not found - skipping graph creation" 1>&2 exit 1 } diff --git a/tutorials/combustion/chemFoam/nc7h16/validation/createGraph b/tutorials/combustion/chemFoam/nc7h16/validation/createGraph index 5564fffd7b..981b068f4b 100755 --- a/tutorials/combustion/chemFoam/nc7h16/validation/createGraph +++ b/tutorials/combustion/chemFoam/nc7h16/validation/createGraph @@ -1,7 +1,7 @@ #!/bin/sh -# Test if gnuplot exists on the system -command -v gnuplot >/dev/null 2>&1 || { +# Require gnuplot +command -v gnuplot >/dev/null || { echo "gnuplot not found - skipping graph creation" 1>&2 exit 1 } @@ -22,4 +22,3 @@ gnuplot</dev/null 2>&1 || { +# Require gnuplot +command -v gnuplot >/dev/null || { echo "gnuplot not found - skipping graph creation" 1>&2 exit 1 } diff --git a/tutorials/combustion/reactingFoam/RAS/membrane/Allclean b/tutorials/combustion/reactingFoam/RAS/membrane/Allclean index 2660b062e1..7e32dc15f4 100755 --- a/tutorials/combustion/reactingFoam/RAS/membrane/Allclean +++ b/tutorials/combustion/reactingFoam/RAS/membrane/Allclean @@ -5,6 +5,6 @@ cd ${0%/*} || exit 1 # Run from this directory cleanCase0 -rm constant/triSurface/membrane-*.stl.gz 2> /dev/null +rm -f constant/triSurface/membrane-*.stl.gz #------------------------------------------------------------------------------ diff --git a/tutorials/compressible/rhoPimpleFoam/RAS/aerofoilNACA0012/Allclean b/tutorials/compressible/rhoPimpleFoam/RAS/aerofoilNACA0012/Allclean index 021f9a67b0..fdef615a9e 100755 --- a/tutorials/compressible/rhoPimpleFoam/RAS/aerofoilNACA0012/Allclean +++ b/tutorials/compressible/rhoPimpleFoam/RAS/aerofoilNACA0012/Allclean @@ -5,6 +5,6 @@ cd ${0%/*} || exit 1 # Run from this directory cleanCase -rm constant/geometry/boundaryLayer.obj > /dev/null 2>&1 +rm -f constant/geometry/boundaryLayer.obj #------------------------------------------------------------------------------ diff --git a/tutorials/compressible/rhoPimpleFoam/RAS/annularThermalMixer/Allclean b/tutorials/compressible/rhoPimpleFoam/RAS/annularThermalMixer/Allclean index 028cdb25c4..31a2d41d8e 100755 --- a/tutorials/compressible/rhoPimpleFoam/RAS/annularThermalMixer/Allclean +++ b/tutorials/compressible/rhoPimpleFoam/RAS/annularThermalMixer/Allclean @@ -5,6 +5,6 @@ cd ${0%/*} || exit 1 # Run from this directory cleanCase0 -rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1 +rm -rf constant/extendedFeatureEdgeMesh #------------------------------------------------------------------------------ diff --git a/tutorials/compressible/rhoPimpleFoam/RAS/externalCoupledSquareBendLiq/Allclean b/tutorials/compressible/rhoPimpleFoam/RAS/externalCoupledSquareBendLiq/Allclean index 098307960e..e1897d73de 100755 --- a/tutorials/compressible/rhoPimpleFoam/RAS/externalCoupledSquareBendLiq/Allclean +++ b/tutorials/compressible/rhoPimpleFoam/RAS/externalCoupledSquareBendLiq/Allclean @@ -5,7 +5,7 @@ cd ${0%/*} || exit 1 # Run from this directory cleanCase0 -rm externalCoupled.control 2> /dev/null +rm -f externalCoupled.control rm -rf comms ### rm -rf VTK diff --git a/tutorials/compressible/rhoPimpleFoam/RAS/externalCoupledSquareBendLiq/Allrun b/tutorials/compressible/rhoPimpleFoam/RAS/externalCoupledSquareBendLiq/Allrun index c582601af0..ac35be70ab 100755 --- a/tutorials/compressible/rhoPimpleFoam/RAS/externalCoupledSquareBendLiq/Allrun +++ b/tutorials/compressible/rhoPimpleFoam/RAS/externalCoupledSquareBendLiq/Allrun @@ -22,7 +22,7 @@ then # ## Can verify parallel operation of createExternalCoupledPatchGeometry if [ "$coupling" = true ] && [ "$testCreate" = true ] then - \rm -f log.createExternalCoupledPatchGeometry + rm -f log.createExternalCoupledPatchGeometry runParallel createExternalCoupledPatchGeometry \ coupleGroup \ -commsDir $PWD/comms diff --git a/tutorials/compressible/rhoPimpleFoam/RAS/externalCoupledSquareBendLiq/externalSolver b/tutorials/compressible/rhoPimpleFoam/RAS/externalCoupledSquareBendLiq/externalSolver index 317fa924f2..1ef2b34711 100755 --- a/tutorials/compressible/rhoPimpleFoam/RAS/externalCoupledSquareBendLiq/externalSolver +++ b/tutorials/compressible/rhoPimpleFoam/RAS/externalCoupledSquareBendLiq/externalSolver @@ -36,7 +36,7 @@ refGrad=0 valueFraction=1 # Remove any old junk -\rm -f $lockFile 2>/dev/null +rm -f "$lockFile" log() { @@ -208,7 +208,7 @@ case "$action" in log "done" # Cleanup. Remove the lock file - \rm -f $lockFile 2>/dev/null + rm -f "$lockFile" ;; esac diff --git a/tutorials/compressible/rhoPorousSimpleFoam/angledDuct/explicit/Allclean b/tutorials/compressible/rhoPorousSimpleFoam/angledDuct/explicit/Allclean index 27a68f18bd..90be62e7b4 100755 --- a/tutorials/compressible/rhoPorousSimpleFoam/angledDuct/explicit/Allclean +++ b/tutorials/compressible/rhoPorousSimpleFoam/angledDuct/explicit/Allclean @@ -6,6 +6,6 @@ cd ${0%/*} || exit 1 # Run from this directory cleanCase0 # Remove copies of common files -\rm -rf constant +rm -rf constant #------------------------------------------------------------------------------ diff --git a/tutorials/compressible/rhoPorousSimpleFoam/angledDuct/explicit/Allrun b/tutorials/compressible/rhoPorousSimpleFoam/angledDuct/explicit/Allrun index 8348af0b8b..e7b56928b6 100755 --- a/tutorials/compressible/rhoPorousSimpleFoam/angledDuct/explicit/Allrun +++ b/tutorials/compressible/rhoPorousSimpleFoam/angledDuct/explicit/Allrun @@ -4,7 +4,7 @@ cd ${0%/*} || exit 1 # Run from this directory #------------------------------------------------------------------------------ echo "Use common files for 0/, constant/ and blockMeshDict" -\rm -rf 0 constant +rm -rf 0 constant \cp -r ../common/0.orig 0 \cp -r ../common/constant constant diff --git a/tutorials/compressible/rhoPorousSimpleFoam/angledDuct/implicit/Allclean b/tutorials/compressible/rhoPorousSimpleFoam/angledDuct/implicit/Allclean index 27a68f18bd..90be62e7b4 100755 --- a/tutorials/compressible/rhoPorousSimpleFoam/angledDuct/implicit/Allclean +++ b/tutorials/compressible/rhoPorousSimpleFoam/angledDuct/implicit/Allclean @@ -6,6 +6,6 @@ cd ${0%/*} || exit 1 # Run from this directory cleanCase0 # Remove copies of common files -\rm -rf constant +rm -rf constant #------------------------------------------------------------------------------ diff --git a/tutorials/compressible/rhoPorousSimpleFoam/angledDuct/implicit/Allrun b/tutorials/compressible/rhoPorousSimpleFoam/angledDuct/implicit/Allrun index 8348af0b8b..e7b56928b6 100755 --- a/tutorials/compressible/rhoPorousSimpleFoam/angledDuct/implicit/Allrun +++ b/tutorials/compressible/rhoPorousSimpleFoam/angledDuct/implicit/Allrun @@ -4,7 +4,7 @@ cd ${0%/*} || exit 1 # Run from this directory #------------------------------------------------------------------------------ echo "Use common files for 0/, constant/ and blockMeshDict" -\rm -rf 0 constant +rm -rf 0 constant \cp -r ../common/0.orig 0 \cp -r ../common/constant constant diff --git a/tutorials/compressible/rhoSimpleFoam/aerofoilNACA0012/Allclean b/tutorials/compressible/rhoSimpleFoam/aerofoilNACA0012/Allclean index 021f9a67b0..fdef615a9e 100755 --- a/tutorials/compressible/rhoSimpleFoam/aerofoilNACA0012/Allclean +++ b/tutorials/compressible/rhoSimpleFoam/aerofoilNACA0012/Allclean @@ -5,6 +5,6 @@ cd ${0%/*} || exit 1 # Run from this directory cleanCase -rm constant/geometry/boundaryLayer.obj > /dev/null 2>&1 +rm -f constant/geometry/boundaryLayer.obj #------------------------------------------------------------------------------ diff --git a/tutorials/compressible/rhoSimpleFoam/gasMixing/injectorPipe/Allclean b/tutorials/compressible/rhoSimpleFoam/gasMixing/injectorPipe/Allclean index b81308ff63..6aff6a9109 100755 --- a/tutorials/compressible/rhoSimpleFoam/gasMixing/injectorPipe/Allclean +++ b/tutorials/compressible/rhoSimpleFoam/gasMixing/injectorPipe/Allclean @@ -5,7 +5,7 @@ cd ${0%/*} || exit 1 # Run from this directory cleanCase0 -rm -f constant/triSurface/*.eMesh* > /dev/null 2>&1 -rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1 +rm -f constant/triSurface/*.eMesh* +rm -rf constant/extendedFeatureEdgeMesh #------------------------------------------------------------------------------ diff --git a/tutorials/compressible/sonicFoam/RAS/nacaAirfoil/Allclean b/tutorials/compressible/sonicFoam/RAS/nacaAirfoil/Allclean index 56711ccc18..9eb8dc8d6e 100755 --- a/tutorials/compressible/sonicFoam/RAS/nacaAirfoil/Allclean +++ b/tutorials/compressible/sonicFoam/RAS/nacaAirfoil/Allclean @@ -10,6 +10,7 @@ rm -f \ constant/cellTable \ constant/polyMesh/cellTableId \ constant/polyMesh/interfaces \ - constant/polyMesh/origCellId > /dev/null 2>&1 + constant/polyMesh/origCellId \ + ; #------------------------------------------------------------------------------ diff --git a/tutorials/compressible/sonicFoam/RAS/nacaAirfoil/Allrun b/tutorials/compressible/sonicFoam/RAS/nacaAirfoil/Allrun index d5fb62d689..fb0d4b92c9 100755 --- a/tutorials/compressible/sonicFoam/RAS/nacaAirfoil/Allrun +++ b/tutorials/compressible/sonicFoam/RAS/nacaAirfoil/Allrun @@ -15,8 +15,8 @@ rm -f \ constant/cellTable \ constant/polyMesh/cellTableId \ constant/polyMesh/interfaces \ - constant/polyMesh/origCellId > /dev/null 2>&1 - + constant/polyMesh/origCellId \ + ; if isParallel "$@" then diff --git a/tutorials/discreteMethods/dsmcFoam/freeSpacePeriodic/Allclean b/tutorials/discreteMethods/dsmcFoam/freeSpacePeriodic/Allclean index 0ea0fe80e8..df4ebb1f55 100755 --- a/tutorials/discreteMethods/dsmcFoam/freeSpacePeriodic/Allclean +++ b/tutorials/discreteMethods/dsmcFoam/freeSpacePeriodic/Allclean @@ -5,6 +5,6 @@ cd ${0%/*} || exit 1 # Run from this directory cleanCase -rm -rf 0/lagrangian 0/dsmcSigmaTcRMax 0/uniform > /dev/null 2>&1 +rm -rf 0/lagrangian 0/dsmcSigmaTcRMax 0/uniform #------------------------------------------------------------------------------ diff --git a/tutorials/discreteMethods/dsmcFoam/freeSpaceStream/Allclean b/tutorials/discreteMethods/dsmcFoam/freeSpaceStream/Allclean index 0ea0fe80e8..df4ebb1f55 100755 --- a/tutorials/discreteMethods/dsmcFoam/freeSpaceStream/Allclean +++ b/tutorials/discreteMethods/dsmcFoam/freeSpaceStream/Allclean @@ -5,6 +5,6 @@ cd ${0%/*} || exit 1 # Run from this directory cleanCase -rm -rf 0/lagrangian 0/dsmcSigmaTcRMax 0/uniform > /dev/null 2>&1 +rm -rf 0/lagrangian 0/dsmcSigmaTcRMax 0/uniform #------------------------------------------------------------------------------ diff --git a/tutorials/discreteMethods/dsmcFoam/supersonicCorner/Allclean b/tutorials/discreteMethods/dsmcFoam/supersonicCorner/Allclean index 0ea0fe80e8..df4ebb1f55 100755 --- a/tutorials/discreteMethods/dsmcFoam/supersonicCorner/Allclean +++ b/tutorials/discreteMethods/dsmcFoam/supersonicCorner/Allclean @@ -5,6 +5,6 @@ cd ${0%/*} || exit 1 # Run from this directory cleanCase -rm -rf 0/lagrangian 0/dsmcSigmaTcRMax 0/uniform > /dev/null 2>&1 +rm -rf 0/lagrangian 0/dsmcSigmaTcRMax 0/uniform #------------------------------------------------------------------------------ diff --git a/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/Allclean b/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/Allclean index 0ea0fe80e8..df4ebb1f55 100755 --- a/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/Allclean +++ b/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/Allclean @@ -5,6 +5,6 @@ cd ${0%/*} || exit 1 # Run from this directory cleanCase -rm -rf 0/lagrangian 0/dsmcSigmaTcRMax 0/uniform > /dev/null 2>&1 +rm -rf 0/lagrangian 0/dsmcSigmaTcRMax 0/uniform #------------------------------------------------------------------------------ diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/validation/createGraphs b/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/validation/createGraphs index da261a8bff..a2e6bfe1d7 100755 --- a/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/validation/createGraphs +++ b/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/validation/createGraphs @@ -87,8 +87,8 @@ EOF echo "createGraphs:" -# Test if gnuplot exists on the system -command -v gnuplot >/dev/null 2>&1 || { +# Require gnuplot +command -v gnuplot >/dev/null || { echo "FOAM FATAL ERROR: gnuplot not found - skipping graph creation" 1>&2 exit 1 } diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/Allrun b/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/Allrun index 57031d0b17..b9d898e314 100755 --- a/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/Allrun +++ b/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/Allrun @@ -17,7 +17,7 @@ trap '\rm -f comms/OpenFOAM.lock 2>/dev/null' INT runApplication decomposePar -allRegions ## Can verify parallel operation of createExternalCoupledPatchGeometry -# \rm -f log.createExternalCoupledPatchGeometry +# rm -f log.createExternalCoupledPatchGeometry # runParallel createExternalCoupledPatchGeometry \ # -regions '(topAir heater)' coupleGroup \ # -commsDir $PWD/comms diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/externalSolver b/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/externalSolver index 0fc3f12b3f..1e2af6cf8a 100755 --- a/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/externalSolver +++ b/tutorials/heatTransfer/chtMultiRegionFoam/externalCoupledHeater/externalSolver @@ -32,7 +32,7 @@ refGrad=0 valueFraction=1 # Remove any old junk -\rm -f $lockFile 2>/dev/null +rm -f "$lockFile" log() { @@ -168,7 +168,7 @@ done log "done" # Remove the lock file too -\rm -f $lockFile 2>/dev/null +rm -f "$lockFile" # For log collector: echo "End" diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/externalSolarLoad/Allclean b/tutorials/heatTransfer/chtMultiRegionFoam/externalSolarLoad/Allclean index 1b62f31e6c..84885ff1f3 100755 --- a/tutorials/heatTransfer/chtMultiRegionFoam/externalSolarLoad/Allclean +++ b/tutorials/heatTransfer/chtMultiRegionFoam/externalSolarLoad/Allclean @@ -4,7 +4,7 @@ cd ${0%/*} || exit 1 # Run from this directory #------------------------------------------------------------------------------ cleanCase0 -\rm allVisibleFaces.obj 2>/dev/null +rm -f allVisibleFaces.obj rm -rf constant/cellToRegion rm -rf constant/*/polyMesh # region meshes diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/Allclean b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/Allclean index 2fb31b75ec..e2f0c3ea3c 100755 --- a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/Allclean +++ b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/Allclean @@ -5,8 +5,8 @@ cd ${0%/*} || exit 1 # Run from this directory cleanCase0 -rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1 -rm -f constant/triSurface/*.eMesh > /dev/null 2>&1 +rm -rf constant/extendedFeatureEdgeMesh +rm -f constant/triSurface/*.eMesh rm -rf VTK rm -rf constant/cellToRegion diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/Allrun b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/Allrun index 57031d0b17..b9d898e314 100755 --- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/Allrun +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/Allrun @@ -17,7 +17,7 @@ trap '\rm -f comms/OpenFOAM.lock 2>/dev/null' INT runApplication decomposePar -allRegions ## Can verify parallel operation of createExternalCoupledPatchGeometry -# \rm -f log.createExternalCoupledPatchGeometry +# rm -f log.createExternalCoupledPatchGeometry # runParallel createExternalCoupledPatchGeometry \ # -regions '(topAir heater)' coupleGroup \ # -commsDir $PWD/comms diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/externalSolver b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/externalSolver index 8f6b9f5a29..2c0777e9a2 100755 --- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/externalSolver +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/externalCoupledHeater/externalSolver @@ -32,7 +32,7 @@ refGrad=0 valueFraction=1 # Remove any old junk -\rm -f $lockFile 2>/dev/null +rm -f "$lockFile" log() { @@ -169,7 +169,7 @@ done log "done" # Remove the lock file too -\rm -f $lockFile 2>/dev/null +rm -f "$lockFile" # For log collector: echo "End" diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/jouleHeatingSolid/createGraphs b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/jouleHeatingSolid/createGraphs index edd9dcb692..82a4f27599 100755 --- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/jouleHeatingSolid/createGraphs +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/jouleHeatingSolid/createGraphs @@ -37,8 +37,8 @@ cd ${0%/*} || exit 1 # Run from this directory # Stop on first error set -e -# Test if gnuplot exists on the system -command -v gnuplot >/dev/null 2>&1 || { +# Require gnuplot +command -v gnuplot >/dev/null || { echo "FOAM FATAL ERROR: gnuplot not found - skipping graph creation" 1>&2 exit 1 } diff --git a/tutorials/incompressible/adjointOptimisationFoam/motorBike/Allclean b/tutorials/incompressible/adjointOptimisationFoam/motorBike/Allclean index 3a7ec0e9ca..11b2d1ad38 100755 --- a/tutorials/incompressible/adjointOptimisationFoam/motorBike/Allclean +++ b/tutorials/incompressible/adjointOptimisationFoam/motorBike/Allclean @@ -6,8 +6,8 @@ cd ${0%/*} || exit 1 # Run from this directory cleanCase0 # Remove surface and features -rm -f constant/triSurface/motorBike.obj.gz > /dev/null 2>&1 -rm -f constant/triSurface/motorBike.eMesh > /dev/null 2>&1 -rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1 +rm -f constant/triSurface/motorBike.obj.gz +rm -f constant/triSurface/motorBike.eMesh +rm -rf constant/extendedFeatureEdgeMesh #------------------------------------------------------------------------------ diff --git a/tutorials/incompressible/adjointOptimisationFoam/sbend/turbulent/lowRe/multiPoint/Allclean b/tutorials/incompressible/adjointOptimisationFoam/sbend/turbulent/lowRe/multiPoint/Allclean index ce71d454d9..2ebf7f59e3 100755 --- a/tutorials/incompressible/adjointOptimisationFoam/sbend/turbulent/lowRe/multiPoint/Allclean +++ b/tutorials/incompressible/adjointOptimisationFoam/sbend/turbulent/lowRe/multiPoint/Allclean @@ -1,5 +1,6 @@ #!/bin/sh cd ${0%/*} || exit 1 # Run from this directory +#------------------------------------------------------------------------------ # Clean time directories and processors rm -rf *[1-9]* processor* @@ -8,6 +9,6 @@ rm -rf *[1-9]* processor* rm -rf optimisation constant/controlPoints # Clean logs -rm -f log.* 2>/dev/null +rm -f log.* #------------------------------------------------------------------------------ diff --git a/tutorials/incompressible/boundaryFoam/boundaryWallFunctionsProfile/Allrun b/tutorials/incompressible/boundaryFoam/boundaryWallFunctionsProfile/Allrun index 0c3635d7b0..7e0ec2d611 100755 --- a/tutorials/incompressible/boundaryFoam/boundaryWallFunctionsProfile/Allrun +++ b/tutorials/incompressible/boundaryFoam/boundaryWallFunctionsProfile/Allrun @@ -36,8 +36,9 @@ done if notTest $@ then # create validation plot - # Test if gnuplot exists on the system - command -v gnuplot >/dev/null 2>&1 || { + + # Require gnuplot + command -v gnuplot >/dev/null || { echo "gnuplot not found - skipping graph creation" 1>&2 exit 1 } diff --git a/tutorials/incompressible/lumpedPointMotion/building/Allrun b/tutorials/incompressible/lumpedPointMotion/building/Allrun index c28467b386..eea388000c 100755 --- a/tutorials/incompressible/lumpedPointMotion/building/Allrun +++ b/tutorials/incompressible/lumpedPointMotion/building/Allrun @@ -62,7 +62,7 @@ copyParallelPointDisplacement() if [ -d "$proc/$latestTime" -a ! -d "$proc/$deltaT" ] then mv $proc/$latestTime $proc/$deltaT - \rm -rf $proc/$deltaT/uniform + rm -rf "$proc/$deltaT/uniform" fi done ) diff --git a/tutorials/incompressible/lumpedPointMotion/building/files/Allrun.transient b/tutorials/incompressible/lumpedPointMotion/building/files/Allrun.transient index 294dd49556..ad37cba112 100755 --- a/tutorials/incompressible/lumpedPointMotion/building/files/Allrun.transient +++ b/tutorials/incompressible/lumpedPointMotion/building/files/Allrun.transient @@ -4,7 +4,7 @@ cd ${0%/*} || exit 1 # Run from this directory #------------------------------------------------------------------------------ # Cleanup old junk that may prevent things from starting -\rm -f comms/OpenFOAM.lock +rm -f comms/OpenFOAM.lock # If OpenFOAM stops prematurely, trigger the external solver to stop trap '[ -e comms/OpenFOAM.lock ] && echo "status=done" > comms/OpenFOAM.lock' EXIT TERM INT diff --git a/tutorials/incompressible/lumpedPointMotion/building/steady/Allrun.pre b/tutorials/incompressible/lumpedPointMotion/building/steady/Allrun.pre index 608b06635a..8b3b45f43f 100755 --- a/tutorials/incompressible/lumpedPointMotion/building/steady/Allrun.pre +++ b/tutorials/incompressible/lumpedPointMotion/building/steady/Allrun.pre @@ -10,7 +10,7 @@ cp $FOAM_TUTORIALS/resources/geometry/building_wtc2.obj constant/triSurface/ # runApplication surfaceFeatureExtract runApplication blockMesh -\rm -f constant/polyMesh/*Level +rm -f constant/polyMesh/*Level unset parallel parallel=true @@ -23,7 +23,7 @@ then # Serial runApplication snappyHexMesh -overwrite - \rm -f constant/polyMesh/refinementHistory* + rm -f constant/polyMesh/refinementHistory* restore0Dir diff --git a/tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/fullCase/Allclean b/tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/fullCase/Allclean index 9d014285a5..efd0f9386b 100755 --- a/tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/fullCase/Allclean +++ b/tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/fullCase/Allclean @@ -4,6 +4,6 @@ cd ${0%/*} || exit 1 # Run from this directory #------------------------------------------------------------------------------ cleanCase -\rm -rf constant/boundaryData *.png +rm -rf constant/boundaryData *.png # ----------------------------------------------------------------------------- diff --git a/tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/fullCase/Allrun b/tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/fullCase/Allrun index 7c710b144a..8272792df3 100755 --- a/tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/fullCase/Allrun +++ b/tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/fullCase/Allrun @@ -29,8 +29,9 @@ runParallel $(getApplication) if notTest $@ then # create validation plot - # Test if gnuplot exists on the system - command -v gnuplot >/dev/null 2>&1 || { + + # Require gnuplot + command -v gnuplot >/dev/null || { echo "gnuplot not found - skipping graph creation" 1>&2 exit 1 } diff --git a/tutorials/incompressible/pimpleFoam/RAS/ellipsekkLOmega/Allclean b/tutorials/incompressible/pimpleFoam/RAS/ellipsekkLOmega/Allclean index 0b9f2bbd48..6f150d0d81 100755 --- a/tutorials/incompressible/pimpleFoam/RAS/ellipsekkLOmega/Allclean +++ b/tutorials/incompressible/pimpleFoam/RAS/ellipsekkLOmega/Allclean @@ -5,6 +5,6 @@ cd ${0%/*} || exit 1 # Run from this directory cleanCase0 -rm -f ppGeometry.vtp 2>/dev/null +rm -f ppGeometry.vtp #------------------------------------------------------------------------------ diff --git a/tutorials/incompressible/pimpleFoam/RAS/propeller/Allclean b/tutorials/incompressible/pimpleFoam/RAS/propeller/Allclean index 2c68b22b70..f0869ead54 100755 --- a/tutorials/incompressible/pimpleFoam/RAS/propeller/Allclean +++ b/tutorials/incompressible/pimpleFoam/RAS/propeller/Allclean @@ -6,8 +6,8 @@ cd ${0%/*} || exit 1 # Run from this directory cleanCase0 # Remove surfaces and features -rm -f constant/triSurface/propellerTip.obj.gz > /dev/null 2>&1 -rm -f constant/triSurface/*.eMesh* > /dev/null 2>&1 -rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1 +rm -f constant/triSurface/propellerTip.obj.gz +rm -f constant/triSurface/*.eMesh* +rm -rf constant/extendedFeatureEdgeMesh #------------------------------------------------------------------------------ diff --git a/tutorials/incompressible/pimpleFoam/RAS/rotatingFanInRoom/Allclean b/tutorials/incompressible/pimpleFoam/RAS/rotatingFanInRoom/Allclean index d6a9c54b76..cc8cdf476c 100755 --- a/tutorials/incompressible/pimpleFoam/RAS/rotatingFanInRoom/Allclean +++ b/tutorials/incompressible/pimpleFoam/RAS/rotatingFanInRoom/Allclean @@ -6,7 +6,7 @@ cd ${0%/*} || exit 1 # Run from this directory cleanCase0 # Remove surfaces and features -rm -f constant/triSurface/*.eMesh* > /dev/null 2>&1 -rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1 +rm -f constant/triSurface/*.eMesh* +rm -rf constant/extendedFeatureEdgeMesh #------------------------------------------------------------------------------ diff --git a/tutorials/incompressible/pimpleFoam/RAS/wingMotion/Allrun b/tutorials/incompressible/pimpleFoam/RAS/wingMotion/Allrun index c7a4482b86..a94f46a2a9 100755 --- a/tutorials/incompressible/pimpleFoam/RAS/wingMotion/Allrun +++ b/tutorials/incompressible/pimpleFoam/RAS/wingMotion/Allrun @@ -26,7 +26,7 @@ cd ${0%/*} || exit 1 # Run from this directory ( cd wingMotion2D_pimpleFoam || exit 1 - \rm -rf constant/polyMesh + rm -rf constant/polyMesh \cp -r ../wingMotion2D_simpleFoam/constant/polyMesh constant restore0Dir runApplication mapFields ../wingMotion2D_simpleFoam -sourceTime latestTime -consistent diff --git a/tutorials/incompressible/pimpleFoam/laminar/planarPoiseuille/validation/createGraph b/tutorials/incompressible/pimpleFoam/laminar/planarPoiseuille/validation/createGraph index b44450a783..77a23fedf4 100755 --- a/tutorials/incompressible/pimpleFoam/laminar/planarPoiseuille/validation/createGraph +++ b/tutorials/incompressible/pimpleFoam/laminar/planarPoiseuille/validation/createGraph @@ -3,8 +3,8 @@ tail -n +4 ../postProcessing/probes/0/U | \ tr -s " " | tr -d '(' | cut -d " " -f2-3 > ../Numerical.dat -# Test if gnuplot exists on the system -command -v gnuplot >/dev/null 2>&1 || { +# Require gnuplot +command -v gnuplot >/dev/null || { echo "gnuplot not found - skipping graph creation" 1>&2 exit 1 } diff --git a/tutorials/incompressible/porousSimpleFoam/angledDuct/explicit/Allclean b/tutorials/incompressible/porousSimpleFoam/angledDuct/explicit/Allclean index 27a68f18bd..90be62e7b4 100755 --- a/tutorials/incompressible/porousSimpleFoam/angledDuct/explicit/Allclean +++ b/tutorials/incompressible/porousSimpleFoam/angledDuct/explicit/Allclean @@ -6,6 +6,6 @@ cd ${0%/*} || exit 1 # Run from this directory cleanCase0 # Remove copies of common files -\rm -rf constant +rm -rf constant #------------------------------------------------------------------------------ diff --git a/tutorials/incompressible/porousSimpleFoam/angledDuct/explicit/Allrun b/tutorials/incompressible/porousSimpleFoam/angledDuct/explicit/Allrun index 8348af0b8b..e7b56928b6 100755 --- a/tutorials/incompressible/porousSimpleFoam/angledDuct/explicit/Allrun +++ b/tutorials/incompressible/porousSimpleFoam/angledDuct/explicit/Allrun @@ -4,7 +4,7 @@ cd ${0%/*} || exit 1 # Run from this directory #------------------------------------------------------------------------------ echo "Use common files for 0/, constant/ and blockMeshDict" -\rm -rf 0 constant +rm -rf 0 constant \cp -r ../common/0.orig 0 \cp -r ../common/constant constant diff --git a/tutorials/incompressible/porousSimpleFoam/angledDuct/implicit/Allclean b/tutorials/incompressible/porousSimpleFoam/angledDuct/implicit/Allclean index 27a68f18bd..90be62e7b4 100755 --- a/tutorials/incompressible/porousSimpleFoam/angledDuct/implicit/Allclean +++ b/tutorials/incompressible/porousSimpleFoam/angledDuct/implicit/Allclean @@ -6,6 +6,6 @@ cd ${0%/*} || exit 1 # Run from this directory cleanCase0 # Remove copies of common files -\rm -rf constant +rm -rf constant #------------------------------------------------------------------------------ diff --git a/tutorials/incompressible/porousSimpleFoam/angledDuct/implicit/Allrun b/tutorials/incompressible/porousSimpleFoam/angledDuct/implicit/Allrun index 8348af0b8b..e7b56928b6 100755 --- a/tutorials/incompressible/porousSimpleFoam/angledDuct/implicit/Allrun +++ b/tutorials/incompressible/porousSimpleFoam/angledDuct/implicit/Allrun @@ -4,7 +4,7 @@ cd ${0%/*} || exit 1 # Run from this directory #------------------------------------------------------------------------------ echo "Use common files for 0/, constant/ and blockMeshDict" -\rm -rf 0 constant +rm -rf 0 constant \cp -r ../common/0.orig 0 \cp -r ../common/constant constant diff --git a/tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/Allclean b/tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/Allclean index 0fda2348a4..f33be130b0 100755 --- a/tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/Allclean +++ b/tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/Allclean @@ -5,8 +5,8 @@ cd ${0%/*} || exit 1 # Run from this directory cleanCase -rm *.obj > /dev/null 2>&1 -rm -r constant/extendedFeatureEdgeMesh > /dev/null 2>&1 -rm constant/triSurface/boundaryAndFaceZones.eMesh > /dev/null 2>&1 +rm -f *.obj +rm -rf constant/extendedFeatureEdgeMesh +rm -f constant/triSurface/boundaryAndFaceZones.eMesh #------------------------------------------------------------------------------ diff --git a/tutorials/incompressible/simpleFoam/T3A/validation/createGraphs b/tutorials/incompressible/simpleFoam/T3A/validation/createGraphs index 2498d2375b..941251e49a 100755 --- a/tutorials/incompressible/simpleFoam/T3A/validation/createGraphs +++ b/tutorials/incompressible/simpleFoam/T3A/validation/createGraphs @@ -1,8 +1,9 @@ #!/bin/sh cd ${0%/*} || exit 1 # Run from this directory +#------------------------------------------------------------------------------ -# Test if gnuplot exists on the system -command -v gnuplot >/dev/null 2>&1 || { +# Require gnuplot +command -v gnuplot >/dev/null || { echo "gnuplot not found - skipping graph creation" 1>&2 exit 1 } diff --git a/tutorials/incompressible/simpleFoam/airFoil2D/Allclean b/tutorials/incompressible/simpleFoam/airFoil2D/Allclean index c89fe3143e..69876cfd86 100755 --- a/tutorials/incompressible/simpleFoam/airFoil2D/Allclean +++ b/tutorials/incompressible/simpleFoam/airFoil2D/Allclean @@ -1,9 +1,9 @@ #!/bin/sh cd ${0%/*} || exit 1 # Run from this directory +#------------------------------------------------------------------------------ # Clean time directories only - rm -rf *[1-9]* -rm -f log.* 2>/dev/null +rm -f log.* #------------------------------------------------------------------------------ diff --git a/tutorials/incompressible/simpleFoam/backwardFacingStep2D/Allclean b/tutorials/incompressible/simpleFoam/backwardFacingStep2D/Allclean index a2837014bc..6b8c683e27 100755 --- a/tutorials/incompressible/simpleFoam/backwardFacingStep2D/Allclean +++ b/tutorials/incompressible/simpleFoam/backwardFacingStep2D/Allclean @@ -5,6 +5,6 @@ cd ${0%/*} || exit 1 # Run from this directory cleanCase -\rm -rf *.dat *.png +rm -rf *.dat *.png # ----------------------------------------------------------------------------- diff --git a/tutorials/incompressible/simpleFoam/backwardFacingStep2D/Allrun b/tutorials/incompressible/simpleFoam/backwardFacingStep2D/Allrun index 611bccf948..95e596b83d 100755 --- a/tutorials/incompressible/simpleFoam/backwardFacingStep2D/Allrun +++ b/tutorials/incompressible/simpleFoam/backwardFacingStep2D/Allrun @@ -10,8 +10,8 @@ if notTest $@ then # Create validation plots - # Test if gnuplot exists on the system - command -v gnuplot >/dev/null 2>&1 || { + # Require gnuplot + command -v gnuplot >/dev/null || { echo "gnuplot not found - skipping graph creation" 1>&2 exit 1 } @@ -25,8 +25,8 @@ then exit 1 } - # Test if awk exists on the system - command -v awk >/dev/null 2>&1 || { + # Require awk + command -v awk >/dev/null || { echo "awk not found - skipping graph creation" 1>&2 exit 1 } @@ -71,7 +71,7 @@ EOF1 foamDictionary -entry boundaryField.lowerWall.value -value $timeDir/wallShearStress | \ sed -n '/(/,/)/p' | sed -e 's/[()]//g;/^\s*$/d' > tau.$$ paste -d ' ' Cx.$$ tau.$$ >> tauw.dat - \rm -f Cx.$$ tau.$$ + rm -f Cx.$$ tau.$$ graphNameTau="backwardStep2D_tau.png" echo "Creating wallshear stress graph to $graphNameTau" diff --git a/tutorials/incompressible/simpleFoam/bump2D/Allclean b/tutorials/incompressible/simpleFoam/bump2D/Allclean index 6fdd3e5800..941541a11f 100755 --- a/tutorials/incompressible/simpleFoam/bump2D/Allclean +++ b/tutorials/incompressible/simpleFoam/bump2D/Allclean @@ -4,6 +4,6 @@ cd ${0%/*} || exit 1 # Run from this directory #------------------------------------------------------------------------------ cleanCase -\rm -f *.png +rm -rf *.png #------------------------------------------------------------------------------ diff --git a/tutorials/incompressible/simpleFoam/bump2D/plot b/tutorials/incompressible/simpleFoam/bump2D/plot index 3d0444c869..56598d6c47 100755 --- a/tutorials/incompressible/simpleFoam/bump2D/plot +++ b/tutorials/incompressible/simpleFoam/bump2D/plot @@ -92,14 +92,14 @@ if notTest $@ then # Create validation plots - # Test if gnuplot exists on the system - command -v gnuplot >/dev/null 2>&1 || { + # Require gnuplot + command -v gnuplot >/dev/null || { echo "gnuplot not found - skipping graph creation" 1>&2 exit 1 } - # Test if awk exists on the system - command -v awk >/dev/null 2>&1 || { + # Require awk + command -v awk >/dev/null || { echo "awk not found - skipping graph creation" 1>&2 exit 1 } diff --git a/tutorials/incompressible/simpleFoam/motorBike/Allclean b/tutorials/incompressible/simpleFoam/motorBike/Allclean index 3a7ec0e9ca..11b2d1ad38 100755 --- a/tutorials/incompressible/simpleFoam/motorBike/Allclean +++ b/tutorials/incompressible/simpleFoam/motorBike/Allclean @@ -6,8 +6,8 @@ cd ${0%/*} || exit 1 # Run from this directory cleanCase0 # Remove surface and features -rm -f constant/triSurface/motorBike.obj.gz > /dev/null 2>&1 -rm -f constant/triSurface/motorBike.eMesh > /dev/null 2>&1 -rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1 +rm -f constant/triSurface/motorBike.obj.gz +rm -f constant/triSurface/motorBike.eMesh +rm -rf constant/extendedFeatureEdgeMesh #------------------------------------------------------------------------------ diff --git a/tutorials/incompressible/simpleFoam/rotorDisk/Allclean b/tutorials/incompressible/simpleFoam/rotorDisk/Allclean index d01deab706..a8a6585c2c 100755 --- a/tutorials/incompressible/simpleFoam/rotorDisk/Allclean +++ b/tutorials/incompressible/simpleFoam/rotorDisk/Allclean @@ -6,10 +6,10 @@ cd ${0%/*} || exit 1 # Run from this directory cleanCase # Remove surface and features -rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1 -rm -f constant/triSurface/rotatingZone.eMesh > /dev/null 2>&1 -rm -f constant/triSurface/fixed.eMesh > /dev/null 2>&1 -rm -f 0/pointLevel > /dev/null 2>&1 -rm -f 0/cellLevel > /dev/null 2>&1 +rm -rf constant/extendedFeatureEdgeMesh +rm -f constant/triSurface/rotatingZone.eMesh +rm -f constant/triSurface/fixed.eMesh +rm -f 0/pointLevel +rm -f 0/cellLevel #------------------------------------------------------------------------------ diff --git a/tutorials/incompressible/simpleFoam/turbulentFlatPlate/Allclean b/tutorials/incompressible/simpleFoam/turbulentFlatPlate/Allclean index a3fc7adfde..3e1293202c 100755 --- a/tutorials/incompressible/simpleFoam/turbulentFlatPlate/Allclean +++ b/tutorials/incompressible/simpleFoam/turbulentFlatPlate/Allclean @@ -5,7 +5,7 @@ cd ${0%/*} || exit 1 # Run from this directory cleanCase -\rm -rf 0 postProcessing-* -\rm -f *.dat *.png constant/turbulenceProperties +rm -rf 0 postProcessing-* +rm -f *.dat *.png constant/turbulenceProperties #------------------------------------------------------------------------------ diff --git a/tutorials/incompressible/simpleFoam/windAroundBuildings/Allclean b/tutorials/incompressible/simpleFoam/windAroundBuildings/Allclean index da26f385ba..c038d0c5fc 100755 --- a/tutorials/incompressible/simpleFoam/windAroundBuildings/Allclean +++ b/tutorials/incompressible/simpleFoam/windAroundBuildings/Allclean @@ -5,7 +5,7 @@ cd ${0%/*} || exit 1 # Run from this directory cleanCase0 -rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1 -rm -f constant/triSurface/buildings.eMesh > /dev/null 2>&1 +rm -rf constant/extendedFeatureEdgeMesh +rm -f constant/triSurface/buildings.eMesh #------------------------------------------------------------------------------ diff --git a/tutorials/lagrangian/MPPICFoam/cyclone/Allclean b/tutorials/lagrangian/MPPICFoam/cyclone/Allclean index 470bd39c79..74c2680904 100755 --- a/tutorials/lagrangian/MPPICFoam/cyclone/Allclean +++ b/tutorials/lagrangian/MPPICFoam/cyclone/Allclean @@ -5,6 +5,6 @@ cd ${0%/*} || exit 1 # Run from this directory cleanCase -# rm -f constant/triSurface/cyclone.stl.gz > /dev/null 2>&1 +# rm -f constant/triSurface/cyclone.stl* #------------------------------------------------------------------------------ diff --git a/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/hopper/Allrun b/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/hopper/Allrun index b493b007af..67537c2e47 100755 --- a/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/hopper/Allrun +++ b/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/hopper/Allrun @@ -10,7 +10,7 @@ cd ${0%/*} || exit 1 # Run from this directory runApplication decomposePar runParallel $(getApplication) runApplication reconstructPar -latestTime - rm log.reconstructPar + rm -f log.reconstructPar runApplication reconstructPar -lagrangianFields \ '(collisionRecordsPairAccessed collisionRecordsPairData \ collisionRecordsPairOrigIdOfOther \ diff --git a/tutorials/lagrangian/reactingParcelFoam/hotBoxes/patchifyObstacles b/tutorials/lagrangian/reactingParcelFoam/hotBoxes/patchifyObstacles index 89dbaee64a..071a41c3ad 100755 --- a/tutorials/lagrangian/reactingParcelFoam/hotBoxes/patchifyObstacles +++ b/tutorials/lagrangian/reactingParcelFoam/hotBoxes/patchifyObstacles @@ -25,7 +25,7 @@ nz=2 tmpSetSet='patchify.setSet' -rm -f patchify.setSet >/dev/null 2>&1 +rm -f patchify.setSet initialiseFaceSet() diff --git a/tutorials/lagrangian/reactingParcelFoam/verticalChannel/Allrun b/tutorials/lagrangian/reactingParcelFoam/verticalChannel/Allrun index bc51bb39ce..b80d4bc025 100755 --- a/tutorials/lagrangian/reactingParcelFoam/verticalChannel/Allrun +++ b/tutorials/lagrangian/reactingParcelFoam/verticalChannel/Allrun @@ -11,7 +11,7 @@ restore0Dir # initialise with potentialFoam solution runApplication potentialFoam -\rm -f 0/phi +rm -f 0/phi # run the solver runApplication $(getApplication) diff --git a/tutorials/lagrangian/reactingParcelFoam/verticalChannelLTS/Allrun b/tutorials/lagrangian/reactingParcelFoam/verticalChannelLTS/Allrun index bc51bb39ce..b80d4bc025 100755 --- a/tutorials/lagrangian/reactingParcelFoam/verticalChannelLTS/Allrun +++ b/tutorials/lagrangian/reactingParcelFoam/verticalChannelLTS/Allrun @@ -11,7 +11,7 @@ restore0Dir # initialise with potentialFoam solution runApplication potentialFoam -\rm -f 0/phi +rm -f 0/phi # run the solver runApplication $(getApplication) diff --git a/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/Allrun b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/Allrun index 49678d0039..181f180407 100755 --- a/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/Allrun +++ b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/Allrun @@ -10,7 +10,7 @@ runApplication blockMesh runApplication potentialFoam # Remove incompatible (volumetric) flux field -\rm -f 0/phi 2>/dev/null +rm -f 0/phi runApplication $(getApplication) diff --git a/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/Allrun-parallel b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/Allrun-parallel index 81abdd4443..525226dabc 100755 --- a/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/Allrun-parallel +++ b/tutorials/lagrangian/simpleReactingParcelFoam/verticalChannel/Allrun-parallel @@ -10,7 +10,7 @@ runApplication blockMesh runApplication potentialFoam # Remove incompatible (volumetric) flux field -\rm -f 0/phi 2>/dev/null +rm -f 0/phi runApplication decomposePar diff --git a/tutorials/mesh/foamyHexMesh/blob/Allclean b/tutorials/mesh/foamyHexMesh/blob/Allclean index 42832f4221..900c7ae9d6 100755 --- a/tutorials/mesh/foamyHexMesh/blob/Allclean +++ b/tutorials/mesh/foamyHexMesh/blob/Allclean @@ -5,19 +5,18 @@ cd ${0%/*} || exit 1 # Run from this directory cleanCase0 -rm -rf constant/triSurface/blob.stl.gz > /dev/null 2>&1 +rm -rf constant/triSurface/blob.stl.gz -rm -rf constant/cellAlignments > /dev/null 2>&1 -rm -rf constant/targetCellSize > /dev/null 2>&1 -rm -rf constant/internalDelaunayVertices > /dev/null 2>&1 +rm -rf constant/cellAlignments +rm -rf constant/targetCellSize +rm -rf constant/internalDelaunayVertices -rm -rf constant/backgroundMeshDecomposition/polyMesh/boundary > /dev/null 2>&1 -rm -rf constant/backgroundMeshDecomposition/polyMesh/faces > /dev/null 2>&1 -rm -rf constant/backgroundMeshDecomposition/polyMesh/neighbour > /dev/null 2>&1 -rm -rf constant/backgroundMeshDecomposition/polyMesh/owner > /dev/null 2>&1 -rm -rf constant/backgroundMeshDecomposition/polyMesh/points > /dev/null 2>&1 +( + cd constant/backgroundMeshDecomposition/polyMesh 2>/dev/null || exit 1 + rm -f boundary faces neighbour owner points +) -rm -rf snapToSurface?.obj > /dev/null 2>&1 -rm -rf tetsToSnapTo.obj > /dev/null 2>&1 +rm -rf snapToSurface?.obj +rm -rf tetsToSnapTo.obj #------------------------------------------------------------------------------ diff --git a/tutorials/mesh/foamyHexMesh/flange/Allclean b/tutorials/mesh/foamyHexMesh/flange/Allclean index 25e1670d97..ebbf9cbfcf 100755 --- a/tutorials/mesh/foamyHexMesh/flange/Allclean +++ b/tutorials/mesh/foamyHexMesh/flange/Allclean @@ -5,18 +5,17 @@ cd ${0%/*} || exit 1 # Run from this directory cleanCase0 -rm -r constant/triSurface/flange.stl.gz > /dev/null 2>&1 +rm -r constant/triSurface/flange.stl.gz -rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1 -rm -r constant/ccx constant/ccy constant/ccz > /dev/null 2>&1 -rm -r constant/internalDelaunayVertices constant/targetCellSize > /dev/null 2>&1 +rm -rf constant/extendedFeatureEdgeMesh +rm -r constant/ccx constant/ccy constant/ccz +rm -r constant/internalDelaunayVertices constant/targetCellSize -rm -rf constant/backgroundMeshDecomposition/polyMesh/boundary > /dev/null 2>&1 -rm -rf constant/backgroundMeshDecomposition/polyMesh/faces > /dev/null 2>&1 -rm -rf constant/backgroundMeshDecomposition/polyMesh/neighbour > /dev/null 2>&1 -rm -rf constant/backgroundMeshDecomposition/polyMesh/owner > /dev/null 2>&1 -rm -rf constant/backgroundMeshDecomposition/polyMesh/points > /dev/null 2>&1 +( + cd constant/backgroundMeshDecomposition/polyMesh 2>/dev/null && \ + rm -f faces neighbour owner points +) -rm -r *.obj > /dev/null 2>&1 +rm -r *.obj #------------------------------------------------------------------------------ diff --git a/tutorials/mesh/foamyHexMesh/mixerVessel/Allrun-pre b/tutorials/mesh/foamyHexMesh/mixerVessel/Allrun-pre index 703e2a3efd..3677f9e4af 100755 --- a/tutorials/mesh/foamyHexMesh/mixerVessel/Allrun-pre +++ b/tutorials/mesh/foamyHexMesh/mixerVessel/Allrun-pre @@ -16,7 +16,7 @@ intersectSurfaces() } -\rm -rf 0 +rm -rf 0 # Run the surface preparation script @@ -76,7 +76,7 @@ then runApplication reconstructParMesh -latestTime \cp -r $latestTime/polyMesh constant - \rm -rf $latestTime + rm -rf $latestTime fi diff --git a/tutorials/mesh/foamyHexMesh/simpleShapes/Allclean b/tutorials/mesh/foamyHexMesh/simpleShapes/Allclean index 88f6dd2594..62db1e1521 100755 --- a/tutorials/mesh/foamyHexMesh/simpleShapes/Allclean +++ b/tutorials/mesh/foamyHexMesh/simpleShapes/Allclean @@ -5,13 +5,12 @@ cd ${0%/*} || exit 1 # Run from this directory cleanCase0 -rm -r constant/extendedFeatureEdgeMesh constant/internalDelaunayVertices > /dev/null 2>&1 -rm -f constant/triSurface/*.eMesh > /dev/null 2>&1 -rm -f constant/triSurface/*_orient* > /dev/null 2>&1 -rm -r constant/tetDualMesh > /dev/null 2>&1 +rm -r constant/extendedFeatureEdgeMesh constant/internalDelaunayVertices +rm -f constant/triSurface/*.eMesh +rm -f constant/triSurface/*_orient* +rm -r constant/tetDualMesh -rm -r snapToSurface?.obj tetsToSnapTo.obj > /dev/null 2>&1 - -rm domain coneAndSphere > /dev/null 2>&1 +rm -r snapToSurface?.obj tetsToSnapTo.obj +rm -f domain coneAndSphere #------------------------------------------------------------------------------ diff --git a/tutorials/mesh/foamyQuadMesh/OpenCFD/Allclean b/tutorials/mesh/foamyQuadMesh/OpenCFD/Allclean index f3b6e87834..08ec200a51 100755 --- a/tutorials/mesh/foamyQuadMesh/OpenCFD/Allclean +++ b/tutorials/mesh/foamyQuadMesh/OpenCFD/Allclean @@ -5,8 +5,8 @@ cd ${0%/*} || exit 1 # Run from this directory cleanCase0 -rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1 -rm -rf constant/triSurface/*.eMesh > /dev/null 2>&1 -rm -rf MeshedSurface.obj > /dev/null 2>&1 +rm -rf constant/extendedFeatureEdgeMesh +rm -rf constant/triSurface/*.eMesh +rm -rf MeshedSurface.obj #------------------------------------------------------------------------------ diff --git a/tutorials/mesh/foamyQuadMesh/jaggedBoundary/Allclean b/tutorials/mesh/foamyQuadMesh/jaggedBoundary/Allclean index 5806b40605..05bd571029 100755 --- a/tutorials/mesh/foamyQuadMesh/jaggedBoundary/Allclean +++ b/tutorials/mesh/foamyQuadMesh/jaggedBoundary/Allclean @@ -5,8 +5,8 @@ cd ${0%/*} || exit 1 # Run from this directory cleanCase -rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1 -rm -rf constant/triSurface/jaggedBoundary.eMesh > /dev/null 2>&1 -rm -rf MeshedSurface.obj > /dev/null 2>&1 +rm -rf constant/extendedFeatureEdgeMesh +rm -rf constant/triSurface/jaggedBoundary.eMesh +rm -rf MeshedSurface.obj #------------------------------------------------------------------------------ diff --git a/tutorials/mesh/foamyQuadMesh/square/Allclean b/tutorials/mesh/foamyQuadMesh/square/Allclean index 347cb05b9b..383a1d240e 100755 --- a/tutorials/mesh/foamyQuadMesh/square/Allclean +++ b/tutorials/mesh/foamyQuadMesh/square/Allclean @@ -5,8 +5,8 @@ cd ${0%/*} || exit 1 # Run from this directory cleanCase -rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1 -rm -rf constant/triSurface/unit_cube.eMesh > /dev/null 2>&1 -rm -rf MeshedSurface*.obj > /dev/null 2>&1 +rm -rf constant/extendedFeatureEdgeMesh +rm -rf constant/triSurface/unit_cube.eMesh +rm -rf MeshedSurface*.obj #------------------------------------------------------------------------------ diff --git a/tutorials/mesh/snappyHexMesh/flange/Allclean b/tutorials/mesh/snappyHexMesh/flange/Allclean index 3d53d6fc63..b23e6e73d9 100755 --- a/tutorials/mesh/snappyHexMesh/flange/Allclean +++ b/tutorials/mesh/snappyHexMesh/flange/Allclean @@ -5,11 +5,11 @@ cd ${0%/*} || exit 1 # Run from this directory cleanCase0 -rm -f ./flange ./*.obj > /dev/null 2>&1 +rm -f ./flange ./*.obj # Remove surface and features -rm -f constant/triSurface/flange.stl.gz > /dev/null 2>&1 -rm -f constant/triSurface/flange.eMesh > /dev/null 2>&1 -rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1 +rm -f constant/triSurface/flange.stl.gz +rm -f constant/triSurface/flange.eMesh +rm -rf constant/extendedFeatureEdgeMesh #------------------------------------------------------------------------------ diff --git a/tutorials/mesh/snappyHexMesh/motorBike_leakDetection/Allclean b/tutorials/mesh/snappyHexMesh/motorBike_leakDetection/Allclean index fdeb115346..30a996996c 100755 --- a/tutorials/mesh/snappyHexMesh/motorBike_leakDetection/Allclean +++ b/tutorials/mesh/snappyHexMesh/motorBike_leakDetection/Allclean @@ -6,7 +6,7 @@ cd ${0%/*} || exit 1 # Run from this directory cleanCase0 # Remove surface and features -rm -f constant/triSurface/*.eMesh > /dev/null 2>&1 -rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1 +rm -f constant/triSurface/*.eMesh +rm -rf constant/extendedFeatureEdgeMesh #------------------------------------------------------------------------------ diff --git a/tutorials/mesh/stitchMesh/simple-cube1/Allclean b/tutorials/mesh/stitchMesh/simple-cube1/Allclean index cf7138f2d2..a55cb8be89 100755 --- a/tutorials/mesh/stitchMesh/simple-cube1/Allclean +++ b/tutorials/mesh/stitchMesh/simple-cube1/Allclean @@ -4,6 +4,6 @@ cd ${0%/*} || exit 1 # Run from this directory #------------------------------------------------------------------------------ cleanCase0 -rmdir constant 2> /dev/null +rmdir constant 2>/dev/null # ----------------------------------------------------------------------------- diff --git a/tutorials/multiphase/cavitatingFoam/LES/throttle/Allclean b/tutorials/multiphase/cavitatingFoam/LES/throttle/Allclean index 49b95f0bb3..3fed01836a 100755 --- a/tutorials/multiphase/cavitatingFoam/LES/throttle/Allclean +++ b/tutorials/multiphase/cavitatingFoam/LES/throttle/Allclean @@ -5,7 +5,7 @@ cd ${0%/*} || exit 1 # Run from this directory cleanCase -rm -rf 0/polyMesh > /dev/null 2>&1 -rm system/topoSetDict > /dev/null 2>&1 +rm -rf 0/polyMesh +rm -f system/topoSetDict #------------------------------------------------------------------------------ diff --git a/tutorials/multiphase/cavitatingFoam/LES/throttle3D/Allclean b/tutorials/multiphase/cavitatingFoam/LES/throttle3D/Allclean index 8817e7ab4b..410e4affe6 100755 --- a/tutorials/multiphase/cavitatingFoam/LES/throttle3D/Allclean +++ b/tutorials/multiphase/cavitatingFoam/LES/throttle3D/Allclean @@ -5,7 +5,7 @@ cd ${0%/*} || exit 1 # Run from this directory cleanCase0 -rm system/topoSetDict > /dev/null 2>&1 -rm -rf processor[0-9] > /dev/null 2>&1 +rm -f system/topoSetDict +rm -rf processor[0-9] #------------------------------------------------------------------------------ diff --git a/tutorials/multiphase/cavitatingFoam/RAS/throttle/Allclean b/tutorials/multiphase/cavitatingFoam/RAS/throttle/Allclean index 49b95f0bb3..3fed01836a 100755 --- a/tutorials/multiphase/cavitatingFoam/RAS/throttle/Allclean +++ b/tutorials/multiphase/cavitatingFoam/RAS/throttle/Allclean @@ -5,7 +5,7 @@ cd ${0%/*} || exit 1 # Run from this directory cleanCase -rm -rf 0/polyMesh > /dev/null 2>&1 -rm system/topoSetDict > /dev/null 2>&1 +rm -rf 0/polyMesh +rm -f system/topoSetDict #------------------------------------------------------------------------------ diff --git a/tutorials/multiphase/driftFluxFoam/RAS/tank3D/Allclean b/tutorials/multiphase/driftFluxFoam/RAS/tank3D/Allclean index 5558bc1596..f404febe8c 100755 --- a/tutorials/multiphase/driftFluxFoam/RAS/tank3D/Allclean +++ b/tutorials/multiphase/driftFluxFoam/RAS/tank3D/Allclean @@ -3,6 +3,6 @@ cd ${0%/*} || exit 1 # Run from this directory # Clean time directories only rm -rf *[1-9]* -rm -f log.* 2>/dev/null +rm -f log.* #------------------------------------------------------------------------------ diff --git a/tutorials/multiphase/interFoam/LES/nozzleFlow2D/Allclean b/tutorials/multiphase/interFoam/LES/nozzleFlow2D/Allclean index 34c27ce61d..ace43dc4e2 100755 --- a/tutorials/multiphase/interFoam/LES/nozzleFlow2D/Allclean +++ b/tutorials/multiphase/interFoam/LES/nozzleFlow2D/Allclean @@ -4,6 +4,7 @@ cd ${0%/*} || exit 1 # Run from this directory #------------------------------------------------------------------------------ cleanCase -rm system/topoSetDict > /dev/null 2>&1 + +rm -f system/topoSetDict #------------------------------------------------------------------------------ diff --git a/tutorials/multiphase/interFoam/RAS/DTCHull/Allclean b/tutorials/multiphase/interFoam/RAS/DTCHull/Allclean index 218cfbeef1..62b835c6b8 100755 --- a/tutorials/multiphase/interFoam/RAS/DTCHull/Allclean +++ b/tutorials/multiphase/interFoam/RAS/DTCHull/Allclean @@ -5,11 +5,11 @@ cd ${0%/*} || exit 1 # Run from this directory cleanCase0 -rm system/topoSetDict > /dev/null 2>&1 +rm -f system/topoSetDict # Remove surfaces and features -rm -f constant/triSurface/DTC-scaled.stl.gz > /dev/null 2>&1 -rm -f constant/triSurface/DTC-scaled.eMesh > /dev/null 2>&1 -rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1 +rm -f constant/triSurface/DTC-scaled.stl.gz +rm -f constant/triSurface/DTC-scaled.eMesh +rm -rf constant/extendedFeatureEdgeMesh #------------------------------------------------------------------------------ diff --git a/tutorials/multiphase/interFoam/RAS/DTCHullMoving/Allclean b/tutorials/multiphase/interFoam/RAS/DTCHullMoving/Allclean index f6e7bddddd..7966d68b7c 100755 --- a/tutorials/multiphase/interFoam/RAS/DTCHullMoving/Allclean +++ b/tutorials/multiphase/interFoam/RAS/DTCHullMoving/Allclean @@ -5,11 +5,11 @@ cd ${0%/*} || exit 1 # Run from this directory cleanCase0 -rm system/topoSetDict > /dev/null 2>&1 +rm -f system/topoSetDict # Remove surface and features -rm -f constant/triSurface/DTC-scaled.stl.gz > /dev/null 2>&1 -rm -f constant/triSurface/DTC-scaled.eMesh > /dev/null 2>&1 -rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1 +rm -f constant/triSurface/DTC-scaled.stl.gz +rm -f constant/triSurface/DTC-scaled.eMesh +rm -rf constant/extendedFeatureEdgeMesh #------------------------------------------------------------------------------ diff --git a/tutorials/multiphase/interFoam/RAS/mixerVesselAMI/Allclean b/tutorials/multiphase/interFoam/RAS/mixerVesselAMI/Allclean index 11ce459dad..e634258c77 100755 --- a/tutorials/multiphase/interFoam/RAS/mixerVesselAMI/Allclean +++ b/tutorials/multiphase/interFoam/RAS/mixerVesselAMI/Allclean @@ -5,7 +5,7 @@ cd ${0%/*} || exit 1 # Run from this directory cleanCase0 -rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1 -rm -f constant/triSurface/*.eMesh* > /dev/null 2>&1 +rm -rf constant/extendedFeatureEdgeMesh +rm -f constant/triSurface/*.eMesh* #------------------------------------------------------------------------------ diff --git a/tutorials/multiphase/interFoam/RAS/mixerVesselAMI/Allrun.pre b/tutorials/multiphase/interFoam/RAS/mixerVesselAMI/Allrun.pre index 38e3dcf5e2..ac567c4fcf 100755 --- a/tutorials/multiphase/interFoam/RAS/mixerVesselAMI/Allrun.pre +++ b/tutorials/multiphase/interFoam/RAS/mixerVesselAMI/Allrun.pre @@ -3,7 +3,7 @@ cd ${0%/*} || exit 1 # Run from this directory . ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions #------------------------------------------------------------------------------ -\rm -rf 0 +rm -rf 0 # Meshing runApplication blockMesh diff --git a/tutorials/multiphase/interFoam/RAS/motorBike/Allclean b/tutorials/multiphase/interFoam/RAS/motorBike/Allclean index 13ecb95a64..deb39ad22d 100755 --- a/tutorials/multiphase/interFoam/RAS/motorBike/Allclean +++ b/tutorials/multiphase/interFoam/RAS/motorBike/Allclean @@ -6,9 +6,9 @@ cd ${0%/*} || exit 1 # Run from this directory cleanCase0 # Remove surface and features -\rm -f constant/triSurface/motorBike.obj.gz > /dev/null 2>&1 -\rm -f constant/triSurface/motorBike.eMesh > /dev/null 2>&1 -\rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1 +rm -f constant/triSurface/motorBike.obj.gz +rm -f constant/triSurface/motorBike.eMesh +rm -rf constant/extendedFeatureEdgeMesh \cp system/controlDict_run system/controlDict diff --git a/tutorials/multiphase/interFoam/RAS/motorBike/Allrun.pre b/tutorials/multiphase/interFoam/RAS/motorBike/Allrun.pre index 49bcd93f9d..e63846a5ad 100755 --- a/tutorials/multiphase/interFoam/RAS/motorBike/Allrun.pre +++ b/tutorials/multiphase/interFoam/RAS/motorBike/Allrun.pre @@ -13,7 +13,7 @@ runApplication blockMesh # Serial # ------ #runApplication snappyHexMesh -overwrite -#\rm -f constant/polyMesh/refinementHistory* +#rm -f constant/polyMesh/refinementHistory* # - set the initial fields # restore0Dir #runApplication setFields diff --git a/tutorials/multiphase/interFoam/RAS/waterChannel/Allclean b/tutorials/multiphase/interFoam/RAS/waterChannel/Allclean index 7d44818d3f..1110f3c72e 100755 --- a/tutorials/multiphase/interFoam/RAS/waterChannel/Allclean +++ b/tutorials/multiphase/interFoam/RAS/waterChannel/Allclean @@ -5,7 +5,7 @@ cd ${0%/*} || exit 1 # Run from this directory cleanCase -rm 0/alpha.water.gz 0/alpha.water 2>/dev/null +rm -f 0/alpha.water.gz 0/alpha.water rm -rf *Flux #------------------------------------------------------------------------------ diff --git a/tutorials/multiphase/interFoam/laminar/damBreakWithObstacle/Allclean b/tutorials/multiphase/interFoam/laminar/damBreakWithObstacle/Allclean index 48516d0f4f..ae8cf886f1 100755 --- a/tutorials/multiphase/interFoam/laminar/damBreakWithObstacle/Allclean +++ b/tutorials/multiphase/interFoam/laminar/damBreakWithObstacle/Allclean @@ -5,6 +5,6 @@ cd ${0%/*} || exit 1 # Run from this directory cleanCase0 -rm system/cellSetDict > /dev/null 2>&1 +rm -f system/cellSetDict #------------------------------------------------------------------------------ diff --git a/tutorials/multiphase/interIsoFoam/damBreak/Allclean b/tutorials/multiphase/interIsoFoam/damBreak/Allclean index dd424f984f..efaad2327a 100755 --- a/tutorials/multiphase/interIsoFoam/damBreak/Allclean +++ b/tutorials/multiphase/interIsoFoam/damBreak/Allclean @@ -4,6 +4,6 @@ cd ${0%/*} || exit 1 # Run from this directory #------------------------------------------------------------------------------ cleanCase0 -\rm -rf isoFaces +rm -rf isoFaces #------------------------------------------------------------------------------ diff --git a/tutorials/multiphase/interIsoFoam/damBreakWithObstacle/Allclean b/tutorials/multiphase/interIsoFoam/damBreakWithObstacle/Allclean index 48516d0f4f..ae8cf886f1 100755 --- a/tutorials/multiphase/interIsoFoam/damBreakWithObstacle/Allclean +++ b/tutorials/multiphase/interIsoFoam/damBreakWithObstacle/Allclean @@ -5,6 +5,6 @@ cd ${0%/*} || exit 1 # Run from this directory cleanCase0 -rm system/cellSetDict > /dev/null 2>&1 +rm -f system/cellSetDict #------------------------------------------------------------------------------ diff --git a/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/Allclean b/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/Allclean index f8c7875f6a..1855670fde 100755 --- a/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/Allclean +++ b/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/Allclean @@ -6,8 +6,8 @@ cd ${0%/*} || exit 1 # Run from this directory cleanCase0 # Remove surface -rm -f constant/triSurface/propellerTip.obj.gz > /dev/null 2>&1 -rm -f constant/triSurface/*.eMesh* > /dev/null 2>&1 -rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1 +rm -f constant/triSurface/propellerTip.obj.gz +rm -f constant/triSurface/*.eMesh* +rm -rf constant/extendedFeatureEdgeMesh #------------------------------------------------------------------------------ diff --git a/tutorials/preProcessing/createZeroDirectory/motorBike/Allclean b/tutorials/preProcessing/createZeroDirectory/motorBike/Allclean index e6ad168f9c..11b2d1ad38 100755 --- a/tutorials/preProcessing/createZeroDirectory/motorBike/Allclean +++ b/tutorials/preProcessing/createZeroDirectory/motorBike/Allclean @@ -6,8 +6,8 @@ cd ${0%/*} || exit 1 # Run from this directory cleanCase0 # Remove surface and features -\rm -f constant/triSurface/motorBike.obj.gz > /dev/null 2>&1 -\rm -f constant/triSurface/motorBike.eMesh > /dev/null 2>&1 -\rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1 +rm -f constant/triSurface/motorBike.obj.gz +rm -f constant/triSurface/motorBike.eMesh +rm -rf constant/extendedFeatureEdgeMesh #------------------------------------------------------------------------------ diff --git a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/Allclean b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/Allclean index e887347334..e2a4d85996 100755 --- a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/Allclean +++ b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/Allclean @@ -5,8 +5,8 @@ cd ${0%/*} || exit 1 # Run from this directory cleanCase0 -rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1 -rm -f constant/triSurface/*.eMesh > /dev/null 2>&1 +rm -rf constant/extendedFeatureEdgeMesh +rm -f constant/triSurface/*.eMesh rm -rf VTK rm -rf constant/bottomAir/polyMesh diff --git a/tutorials/preProcessing/decompositionConstraints/geometric/Allclean b/tutorials/preProcessing/decompositionConstraints/geometric/Allclean index 77ddfb20c0..3648982ef8 100755 --- a/tutorials/preProcessing/decompositionConstraints/geometric/Allclean +++ b/tutorials/preProcessing/decompositionConstraints/geometric/Allclean @@ -3,7 +3,7 @@ cd ${0%/*} || exit 1 # Run from this directory . ${WM_PROJECT_DIR:?}/bin/tools/CleanFunctions # Tutorial clean functions #------------------------------------------------------------------------------ -\rm -f constant/triSurface/blob.obj +rm -f constant/triSurface/blob.obj cleanCase0 diff --git a/tutorials/verificationAndValidation/turbulentInflow/Allclean b/tutorials/verificationAndValidation/turbulentInflow/Allclean index 67eab912aa..0a6c7b2a83 100755 --- a/tutorials/verificationAndValidation/turbulentInflow/Allclean +++ b/tutorials/verificationAndValidation/turbulentInflow/Allclean @@ -4,7 +4,7 @@ cd ${0%/*} || exit 1 # Run from this directory #------------------------------------------------------------------------------ cleanCase0 -\rm -rf constant/boundaryData/inlet 2>/dev/null -\rm -rf results 2>/dev/null +rm -rf constant/boundaryData/inlet +rm -rf results #------------------------------------------------------------------------------ diff --git a/tutorials/verificationAndValidation/turbulentInflow/Allrun b/tutorials/verificationAndValidation/turbulentInflow/Allrun index 867d2e922e..8a23f43d5f 100755 --- a/tutorials/verificationAndValidation/turbulentInflow/Allrun +++ b/tutorials/verificationAndValidation/turbulentInflow/Allrun @@ -28,7 +28,7 @@ do mv -f log.* *.png postProcessing "$results" 2>/dev/null cleanTimeDirectories - \rm -rf processor* >/dev/null 2>&1 + rm -rf processor* done #------------------------------------------------------------------------------ diff --git a/tutorials/verificationAndValidation/turbulentInflow/Allrun-parallel b/tutorials/verificationAndValidation/turbulentInflow/Allrun-parallel index 26bc6ac809..c3584e519d 100755 --- a/tutorials/verificationAndValidation/turbulentInflow/Allrun-parallel +++ b/tutorials/verificationAndValidation/turbulentInflow/Allrun-parallel @@ -29,7 +29,7 @@ do mv -f log.* *.png postProcessing "$results" 2>/dev/null cleanTimeDirectories - \rm -rf processor* >/dev/null 2>&1 + rm -rf processor* done #------------------------------------------------------------------------------ diff --git a/tutorials/verificationAndValidation/turbulentInflow/createGraphs b/tutorials/verificationAndValidation/turbulentInflow/createGraphs index 8f73316de2..7ef92f3cb5 100755 --- a/tutorials/verificationAndValidation/turbulentInflow/createGraphs +++ b/tutorials/verificationAndValidation/turbulentInflow/createGraphs @@ -2,7 +2,7 @@ cd ${0%/*} || exit 1 # Run from this directory # Require gnuplot -command -v gnuplot >/dev/null 2>&1 || { +command -v gnuplot >/dev/null || { echo "gnuplot not found - skipping graph creation" 1>&2 exit 1 } diff --git a/wmake/scripts/cmakeFunctions b/wmake/scripts/cmakeFunctions index b67dce2d5b..f43a0bea79 100644 --- a/wmake/scripts/cmakeFunctions +++ b/wmake/scripts/cmakeFunctions @@ -94,7 +94,7 @@ cmakeVersioned() # Version changed sentinel=$(sameDependency "$depend" "$sourceDir") || \ - rm -rf "$objectsDir" > /dev/null 2>&1 + rm -rf "$objectsDir" 2>/dev/null mkdir -p "$objectsDir" \ && (cd "$objectsDir" && _cmake "$@" "$sourceDir" && make) \ @@ -120,7 +120,7 @@ cmakeVersionedInstall() # Version changed sentinel=$(sameDependency "$depend" "$sourceDir") || \ - rm -rf "$objectsDir" > /dev/null 2>&1 + rm -rf "$objectsDir" 2>/dev/null mkdir -p "$objectsDir" \ && (cd "$objectsDir" && _cmake "$@" "$sourceDir" && make install) \ @@ -147,7 +147,7 @@ wmakeVersioned() # Version changed sentinel=$(sameDependency "$depend" "$sourceDir") || \ - rm -rf "$objectsDir" > /dev/null 2>&1 + rm -rf "$objectsDir" 2>/dev/null mkdir -p "$objectsDir" \ && wmake "$@" \ diff --git a/wmake/scripts/paraviewFunctions b/wmake/scripts/paraviewFunctions index dffa776102..c545681870 100644 --- a/wmake/scripts/paraviewFunctions +++ b/wmake/scripts/paraviewFunctions @@ -119,7 +119,7 @@ have_pvplugin_support() warn="==> skip paraview-plugin" # Trivial check - command -v cmake > /dev/null 2>&1 || { + command -v cmake >/dev/null || { echo "$warn (no cmake)" return 1 } diff --git a/wmake/scripts/wmakeFunctions b/wmake/scripts/wmakeFunctions index 4c478cf261..e9edf8853d 100644 --- a/wmake/scripts/wmakeFunctions +++ b/wmake/scripts/wmakeFunctions @@ -193,7 +193,7 @@ removeObjectDir() local objectsDir=$(findObjectDir ${1:-.}) if [ -d "$objectsDir" ] then - rm -rf "$objectsDir" > /dev/null 2>&1 + rm -rf "$objectsDir" 2>/dev/null fi }