STYLE: remove unnecessary stdout, stderr /dev/null redirects

- no stderr redirect needed:
    * 'command -v'

- no stdout/stderr redirect needed:
    * 'rm -f'

STYLE: consistent spacing after redirects
This commit is contained in:
Mark Olesen
2019-11-06 10:44:36 +01:00
committed by Andrew Heather
parent ec7e3c88e4
commit e6dfb39c66
131 changed files with 281 additions and 282 deletions

View File

@ -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
#------------------------------------------------------------------------------

View File

@ -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.*
#------------------------------------------------------------------------------

View File

@ -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
}

View File

@ -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
)

View File

@ -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

View File

@ -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

View File

@ -4,6 +4,6 @@ cd ${0%/*} || exit 1 # Run from this directory
#------------------------------------------------------------------------------
cleanCase
\rm -rf constant/boundaryData *.png
rm -rf constant/boundaryData *.png
# -----------------------------------------------------------------------------

View File

@ -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
}

View File

@ -5,6 +5,6 @@ cd ${0%/*} || exit 1 # Run from this directory
cleanCase0
rm -f ppGeometry.vtp 2>/dev/null
rm -f ppGeometry.vtp
#------------------------------------------------------------------------------

View File

@ -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
#------------------------------------------------------------------------------

View File

@ -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
#------------------------------------------------------------------------------

View File

@ -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

View File

@ -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
}

View File

@ -6,6 +6,6 @@ cd ${0%/*} || exit 1 # Run from this directory
cleanCase0
# Remove copies of common files
\rm -rf constant
rm -rf constant
#------------------------------------------------------------------------------

View File

@ -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

View File

@ -6,6 +6,6 @@ cd ${0%/*} || exit 1 # Run from this directory
cleanCase0
# Remove copies of common files
\rm -rf constant
rm -rf constant
#------------------------------------------------------------------------------

View File

@ -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

View File

@ -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
#------------------------------------------------------------------------------

View File

@ -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
}

View File

@ -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.*
#------------------------------------------------------------------------------

View File

@ -5,6 +5,6 @@ cd ${0%/*} || exit 1 # Run from this directory
cleanCase
\rm -rf *.dat *.png
rm -rf *.dat *.png
# -----------------------------------------------------------------------------

View File

@ -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"

View File

@ -4,6 +4,6 @@ cd ${0%/*} || exit 1 # Run from this directory
#------------------------------------------------------------------------------
cleanCase
\rm -f *.png
rm -rf *.png
#------------------------------------------------------------------------------

View File

@ -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
}

View File

@ -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
#------------------------------------------------------------------------------

View File

@ -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
#------------------------------------------------------------------------------

View File

@ -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
#------------------------------------------------------------------------------

View File

@ -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
#------------------------------------------------------------------------------