From a6a90838fa69f6fe4379fd79dc2ac1f1e6e7c35a Mon Sep 17 00:00:00 2001
From: Mark Olesen <Mark.Olesen@Germany>
Date: Mon, 21 Nov 2016 10:18:00 +0100
Subject: [PATCH] STYLE: adjust tutorial Allrun scripts (issue #310)

- A few without a 'cd' at the start.
  Use $(getApplication) directly in more places (for clarity).
---
 tutorials/DNS/dnsFoam/boxTurb16/Allrun                 |  5 +----
 tutorials/basic/laplacianFoam/flange/Allrun            |  5 +----
 tutorials/basic/potentialFoam/cylinder/Allrun          |  4 +---
 tutorials/basic/potentialFoam/pitzDaily/Allrun         |  4 +---
 .../PDRFoam/flamePropagationWithObstacles/Allrun       |  2 --
 tutorials/combustion/chemFoam/gri/Allrun               |  4 +---
 tutorials/combustion/chemFoam/gri/validation/Allrun    |  3 ---
 tutorials/combustion/chemFoam/h2/Allrun                |  5 +----
 tutorials/combustion/chemFoam/h2/validation/Allrun     |  3 ---
 tutorials/combustion/chemFoam/ic8h18/Allrun            |  5 +----
 tutorials/combustion/chemFoam/ic8h18/validation/Allrun |  3 ---
 tutorials/combustion/chemFoam/ic8h18_TDAC/Allrun       |  5 +----
 .../combustion/chemFoam/ic8h18_TDAC/validation/Allrun  |  3 ---
 tutorials/combustion/chemFoam/nc7h16/Allrun            |  5 +----
 tutorials/combustion/chemFoam/nc7h16/validation/Allrun |  3 ---
 tutorials/combustion/engineFoam/kivaTest/Allrun        |  6 +-----
 .../combustion/fireFoam/LES/compartmentFire/Allclean   |  2 +-
 .../combustion/fireFoam/LES/compartmentFire/Allrun     |  4 ++--
 .../fireFoam/LES/oppositeBurningPanels/Allrun          |  3 ---
 .../combustion/fireFoam/LES/simplePMMApanel/Allclean   |  2 +-
 .../combustion/fireFoam/LES/simplePMMApanel/Allrun     |  6 +-----
 .../combustion/fireFoam/LES/smallPoolFire2D/Allrun     |  2 --
 .../combustion/fireFoam/LES/smallPoolFire3D/Allrun     |  8 ++------
 .../compressible/rhoPimpleFoam/RAS/angledDuct/Allrun   |  6 ++++--
 .../rhoPimpleFoam/RAS/angledDuctLTS/Allrun             |  6 ++++--
 .../rhoPimpleFoam/RAS/mixerVessel2D/Allrun             |  7 ++++---
 .../rhoPimpleFoam/laminar/helmholtzResonance/Allrun    |  7 +++++--
 .../rhoPimpleFoam/laminar/sineWaveDamping/Allrun       |  2 ++
 .../rhoSimpleFoam/angledDuctExplicitFixedCoeff/Allrun  |  6 ++----
 .../compressible/sonicFoam/laminar/shockTube/Allrun    |  4 +---
 tutorials/discreteMethods/dsmcFoam/wedge15Ma5/Allrun   |  1 -
 .../molecularDynamics/mdFoam/nanoNozzle/Allrun         |  6 +-----
 tutorials/electromagnetics/mhdFoam/hartmann/Allrun     |  5 +----
 .../buoyantBoussinesqPimpleFoam/hotRoom/Allrun         |  4 +---
 .../buoyantBoussinesqSimpleFoam/hotRoom/Allrun         |  4 +---
 .../buoyantPimpleFoam/thermocoupleTestCase/Allrun      |  5 +----
 .../buoyantSimpleFoam/buoyantCavity/Allrun             |  5 +----
 .../buoyantSimpleFoam/circuitBoardCooling/Allrun       | 10 ++++++----
 .../buoyantSimpleFoam/hotRadiationRoom/Allrun          |  4 +---
 .../buoyantSimpleFoam/hotRadiationRoomFvDOM/Allrun     |  4 +---
 .../chtMultiRegionFoam/externalSolarLoad/Allclean      |  2 +-
 .../chtMultiRegionFoam/externalSolarLoad/Allrun        |  2 +-
 .../chtMultiRegionFoam/externalSolarLoad/Allrun.pre    |  2 +-
 .../chtMultiRegionFoam/multiRegionHeater/Allrun        |  1 -
 .../chtMultiRegionFoam/snappyMultiRegionHeater/Allrun  |  1 -
 .../chtMultiRegionFoam/windshieldCondensation/Allrun   |  2 ++
 .../chtMultiRegionFoam/windshieldDefrost/Allrun        |  2 ++
 .../windshieldDefrost/Allrun-parallel                  | 10 +++++-----
 .../chtMultiRegionFoam/windshieldDefrost/Allrun.pre    |  2 ++
 .../chtMultiRegionSimpleFoam/heatExchanger/Allrun      |  7 ++++---
 .../heatExchanger/Allrun-parallel                      |  3 ++-
 .../chtMultiRegionSimpleFoam/heatExchanger/Allrun.pre  |  2 ++
 .../multiRegionHeaterRadiation/Allrun                  |  3 ---
 .../multiRegionHeaterRadiation/Allrun-parallel         |  2 --
 .../multiRegionHeaterRadiation/Allrun.pre              |  1 -
 tutorials/incompressible/SRFPimpleFoam/rotor2D/Allrun  |  4 +---
 .../incompressible/icoFoam/cavityMappingTest/Allclean  |  2 +-
 .../incompressible/icoFoam/cavityMappingTest/Allrun    |  3 ++-
 .../icoFoam/cavityMappingTest/Allrun-parallel          |  4 +++-
 tutorials/incompressible/icoFoam/elbow/Allrun          |  4 +---
 .../pimpleDyMFoam/mixerVesselAMI2D/Allrun              |  6 ++----
 .../pimpleDyMFoam/oscillatingInletACMI2D/Allrun        |  2 ++
 .../oscillatingInletACMI2D/Allrun-parallel             |  4 ++--
 .../pimpleDyMFoam/oscillatingInletACMI2D/Allrun.pre    |  2 ++
 .../incompressible/pimpleDyMFoam/propeller/Allrun      |  4 ++--
 .../incompressible/pimpleFoam/LES/channel395/Allrun    |  6 ++----
 .../incompressible/pimpleFoam/RAS/TJunctionFan/Allrun  |  7 ++++---
 .../pimpleFoam/RAS/elipsekkLOmega/Allrun               |  9 +++------
 .../incompressible/pimpleFoam/channel395DFSEM/Allrun   |  9 +++------
 .../pisoFoam/LES/motorBike/lesFiles/Allrun             |  3 +++
 .../pisoFoam/laminar/porousBlockage/Allrun             |  6 +-----
 .../porousSimpleFoam/straightDuctImplicit/Allrun.pre   |  2 +-
 tutorials/incompressible/simpleFoam/T3A/Allrun         |  5 +----
 tutorials/incompressible/simpleFoam/airFoil2D/Allrun   |  4 +---
 .../incompressible/simpleFoam/mixerVessel2D/Allrun     |  4 +---
 tutorials/incompressible/simpleFoam/motorBike/Allclean |  2 +-
 tutorials/incompressible/simpleFoam/pipeCyclic/Allrun  |  7 ++-----
 tutorials/incompressible/simpleFoam/rotorDisk/Allclean |  2 +-
 .../simpleFoam/windAroundBuildings/Allclean            |  2 +-
 .../simpleFoam/windAroundBuildings/Allrun              |  2 +-
 tutorials/lagrangian/MPPICFoam/cyclone/Allclean        |  2 +-
 .../coalChemistryFoam/simplifiedSiwek/Allrun           |  4 +---
 .../lagrangian/reactingParcelFilmFoam/cylinder/Allrun  |  5 +++--
 .../reactingParcelFilmFoam/cylinder/Allrun.pre         |  5 +++++
 .../lagrangian/reactingParcelFilmFoam/hotBoxes/Allrun  |  4 ++--
 .../reactingParcelFilmFoam/hotBoxes/Allrun-parallel    |  5 ++---
 .../reactingParcelFilmFoam/hotBoxes/Allrun.pre         |  2 ++
 .../reactingParcelFilmFoam/rivuletPanel/Allrun         |  5 +++--
 .../reactingParcelFilmFoam/rivuletPanel/Allrun.pre     |  5 +++++
 .../reactingParcelFilmFoam/splashPanel/Allrun          |  5 +++--
 .../reactingParcelFilmFoam/splashPanel/Allrun.pre      |  5 +++++
 tutorials/mesh/foamyHexMesh/mixerVessel/Allrun-pre     |  2 --
 .../mesh/foamyHexMesh/mixerVessel/Allrun-simulation    |  7 ++-----
 tutorials/mesh/foamyQuadMesh/OpenCFD/Allrun            |  1 -
 .../mesh/foamyQuadMesh/OpenCFD/Allrun-rhoCentralFoam   |  1 -
 tutorials/mesh/foamyQuadMesh/jaggedBoundary/Allrun     |  1 -
 tutorials/mesh/foamyQuadMesh/square/Allrun             |  1 -
 tutorials/mesh/parallel/cavity/Allclean                |  2 +-
 tutorials/mesh/snappyHexMesh/flange/Allrun             |  4 ++++
 .../multiphase/MPPICInterFoam/twoPhasePachuka/Allrun   |  3 ---
 .../multiphase/cavitatingFoam/LES/throttle/Allrun      |  5 +----
 .../multiphase/cavitatingFoam/LES/throttle3D/Allrun    |  5 +----
 .../multiphase/cavitatingFoam/RAS/throttle/Allrun      |  4 +---
 .../compressibleInterDyMFoam/RAS/sloshingTank2D/Allrun |  2 +-
 .../laminar/damBreak4phase/Allrun                      |  5 +----
 .../multiphase/driftFluxFoam/RAS/mixerVessel2D/Allrun  |  4 +---
 tutorials/multiphase/driftFluxFoam/RAS/tank3D/Allrun   |  4 +---
 .../condensatingVessel/Allrun                          |  4 +---
 .../multiphase/interDyMFoam/RAS/floatingObject/Allrun  |  5 +----
 .../multiphase/interDyMFoam/RAS/mixerVesselAMI/Allrun  | 10 +---------
 .../interDyMFoam/RAS/mixerVesselAMI/Allrun.pre         |  3 ---
 .../multiphase/interDyMFoam/RAS/motorBike/Allclean     |  2 +-
 tutorials/multiphase/interDyMFoam/RAS/motorBike/Allrun |  1 -
 .../multiphase/interDyMFoam/RAS/motorBike/Allrun.pre   |  2 ++
 .../interDyMFoam/laminar/sloshingTank2D/Allrun         |  3 ++-
 .../interDyMFoam/laminar/sloshingTank2D3DoF/Allrun     |  3 ++-
 .../interDyMFoam/laminar/sloshingTank3D/Allrun         |  3 ++-
 .../interDyMFoam/laminar/sloshingTank3D3DoF/Allrun     |  3 ++-
 .../interDyMFoam/laminar/sloshingTank3D6DoF/Allrun     |  1 +
 .../interDyMFoam/laminar/testTubeMixer/Allrun          |  3 ++-
 tutorials/multiphase/interFoam/LES/nozzleFlow2D/Allrun |  5 +----
 tutorials/multiphase/interFoam/RAS/angledDuct/Allrun   |  6 ++++--
 .../multiphase/interFoam/RAS/damBreak/damBreak/Allrun  |  5 +----
 .../interFoam/RAS/damBreakPorousBaffle/Allrun          |  5 +----
 .../multiphase/interFoam/RAS/waterChannel/Allmesh      |  2 +-
 tutorials/multiphase/interFoam/RAS/waterChannel/Allrun |  4 +---
 tutorials/multiphase/interFoam/RAS/weirOverflow/Allrun |  5 +++--
 .../multiphase/interFoam/laminar/capillaryRise/Allrun  |  5 ++---
 .../interFoam/laminar/damBreak/damBreak/Allrun         |  5 +----
 .../multiphase/interFoam/laminar/mixerVessel2D/Allrun  |  4 +---
 .../multiphaseEulerFoam/damBreak4phase/Allrun          |  5 +----
 .../multiphaseEulerFoam/damBreak4phaseFine/Allrun      |  5 +----
 .../multiphaseEulerFoam/mixerVessel2D/Allrun           |  4 +---
 .../laminar/mixerVesselAMI2D/Allrun                    |  7 +++----
 .../multiphaseInterFoam/laminar/damBreak4phase/Allrun  |  5 +----
 .../laminar/damBreak4phaseFine/Allrun                  |  5 +----
 .../multiphaseInterFoam/laminar/mixerVessel2D/Allrun   |  4 +---
 .../potentialFreeSurfaceDyMFoam/oscillatingBox/Allrun  |  7 ++-----
 .../potentialFreeSurfaceFoam/oscillatingBox/Allrun     |  5 +----
 .../laminar/mixerVessel2D/Allrun                       |  4 +---
 .../reactingTwoPhaseEulerFoam/RAS/wallBoiling/Allrun   |  6 ++----
 .../RAS/wallBoilingIATE/Allrun                         |  6 ++----
 .../laminar/mixerVessel2D/Allrun                       |  4 +---
 .../multiphase/twoLiquidMixingFoam/lockExchange/Allrun |  5 +----
 .../twoPhaseEulerFoam/laminar/mixerVessel2D/Allrun     |  4 +---
 .../preProcessing/createZeroDirectory/cavity/Allrun    |  6 ++++--
 .../preProcessing/createZeroDirectory/motorBike/Allrun |  2 +-
 .../snappyMultiRegionHeater/Allclean                   |  2 +-
 .../createZeroDirectory/snappyMultiRegionHeater/Allrun |  2 +-
 .../solidDisplacementFoam/plateHole/Allrun             |  4 +---
 150 files changed, 226 insertions(+), 378 deletions(-)

diff --git a/tutorials/DNS/dnsFoam/boxTurb16/Allrun b/tutorials/DNS/dnsFoam/boxTurb16/Allrun
index 4ff5fb63f24..125c236a6c7 100755
--- a/tutorials/DNS/dnsFoam/boxTurb16/Allrun
+++ b/tutorials/DNS/dnsFoam/boxTurb16/Allrun
@@ -4,12 +4,9 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
-# Get application name
-application=$(getApplication)
-
 runApplication blockMesh
 runApplication boxTurb
-runApplication $application
+runApplication $(getApplication)
 runApplication -s enstrophy  postProcess -func enstrophy
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/basic/laplacianFoam/flange/Allrun b/tutorials/basic/laplacianFoam/flange/Allrun
index ac1e880823e..59e996ba18f 100755
--- a/tutorials/basic/laplacianFoam/flange/Allrun
+++ b/tutorials/basic/laplacianFoam/flange/Allrun
@@ -4,9 +4,6 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
-# Get application name
-application=$(getApplication)
-
 runAnsysToFoam()
 {
     if [ -f log.ansysToFoam ]
@@ -19,7 +16,7 @@ runAnsysToFoam()
 }
 
 runAnsysToFoam flange.ans 0.001
-runApplication $application
+runApplication $(getApplication)
 runApplication foamToEnsight -noZero
 runApplication foamToEnsightParts -noZero
 runApplication foamToVTK
diff --git a/tutorials/basic/potentialFoam/cylinder/Allrun b/tutorials/basic/potentialFoam/cylinder/Allrun
index fc215995a52..ad39e41c0a3 100755
--- a/tutorials/basic/potentialFoam/cylinder/Allrun
+++ b/tutorials/basic/potentialFoam/cylinder/Allrun
@@ -4,11 +4,9 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
-application=$(getApplication)
-
 restore0Dir
 runApplication blockMesh
-runApplication $application -withFunctionObjects -writePhi -writep
+runApplication $(getApplication) -withFunctionObjects -writePhi -writep
 runApplication streamFunction
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/basic/potentialFoam/pitzDaily/Allrun b/tutorials/basic/potentialFoam/pitzDaily/Allrun
index 8affee72b0f..2c9adcb14b5 100755
--- a/tutorials/basic/potentialFoam/pitzDaily/Allrun
+++ b/tutorials/basic/potentialFoam/pitzDaily/Allrun
@@ -4,11 +4,9 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
-application=$(getApplication)
-
 restore0Dir
 runApplication blockMesh
-runApplication $application -writePhi -writep
+runApplication $(getApplication) -writePhi -writep
 runApplication streamFunction
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/Allrun b/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/Allrun
index 12857916b89..312f7aa370c 100755
--- a/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/Allrun
+++ b/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/Allrun
@@ -1,7 +1,6 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # Run from this directory
 
-
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
@@ -12,7 +11,6 @@ runApplication topoSet
 
 runApplication PDRMesh -overwrite
 
-# Run
 runApplication $(getApplication)
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/combustion/chemFoam/gri/Allrun b/tutorials/combustion/chemFoam/gri/Allrun
index 7175763e197..9f91a1a6ccd 100755
--- a/tutorials/combustion/chemFoam/gri/Allrun
+++ b/tutorials/combustion/chemFoam/gri/Allrun
@@ -4,14 +4,12 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
-# Set application name
-application=$(getApplication)
 
 runApplication chemkinToFoam \
                chemkin/chem.inp chemkin/therm.dat chemkin/transportProperties \
                constant/reactions constant/thermo
 
-runApplication $application
+runApplication $(getApplication)
 
 (cd validation && ./Allrun $*)
 
diff --git a/tutorials/combustion/chemFoam/gri/validation/Allrun b/tutorials/combustion/chemFoam/gri/validation/Allrun
index 0720352189f..041628b097f 100755
--- a/tutorials/combustion/chemFoam/gri/validation/Allrun
+++ b/tutorials/combustion/chemFoam/gri/validation/Allrun
@@ -1,5 +1,4 @@
 #!/bin/sh
-
 cd ${0%/*} || exit 1    # Run from this directory
 
 # Extract Chemkin II data into a friendlier format
@@ -10,5 +9,3 @@ grep '^ Time (sec)' ../chemkin/senk.out | awk '{print $4 "    " $8 }' \
 ./createGraph
 
 #------------------------------------------------------------------------------
-
-
diff --git a/tutorials/combustion/chemFoam/h2/Allrun b/tutorials/combustion/chemFoam/h2/Allrun
index de26a4017d4..a90b3d865ce 100755
--- a/tutorials/combustion/chemFoam/h2/Allrun
+++ b/tutorials/combustion/chemFoam/h2/Allrun
@@ -4,10 +4,7 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
-# Set application name
-application=$(getApplication)
-
-runApplication $application
+runApplication $(getApplication)
 
 (cd validation && ./Allrun $*)
 
diff --git a/tutorials/combustion/chemFoam/h2/validation/Allrun b/tutorials/combustion/chemFoam/h2/validation/Allrun
index 0720352189f..041628b097f 100755
--- a/tutorials/combustion/chemFoam/h2/validation/Allrun
+++ b/tutorials/combustion/chemFoam/h2/validation/Allrun
@@ -1,5 +1,4 @@
 #!/bin/sh
-
 cd ${0%/*} || exit 1    # Run from this directory
 
 # Extract Chemkin II data into a friendlier format
@@ -10,5 +9,3 @@ grep '^ Time (sec)' ../chemkin/senk.out | awk '{print $4 "    " $8 }' \
 ./createGraph
 
 #------------------------------------------------------------------------------
-
-
diff --git a/tutorials/combustion/chemFoam/ic8h18/Allrun b/tutorials/combustion/chemFoam/ic8h18/Allrun
index de26a4017d4..a90b3d865ce 100755
--- a/tutorials/combustion/chemFoam/ic8h18/Allrun
+++ b/tutorials/combustion/chemFoam/ic8h18/Allrun
@@ -4,10 +4,7 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
-# Set application name
-application=$(getApplication)
-
-runApplication $application
+runApplication $(getApplication)
 
 (cd validation && ./Allrun $*)
 
diff --git a/tutorials/combustion/chemFoam/ic8h18/validation/Allrun b/tutorials/combustion/chemFoam/ic8h18/validation/Allrun
index 0720352189f..041628b097f 100755
--- a/tutorials/combustion/chemFoam/ic8h18/validation/Allrun
+++ b/tutorials/combustion/chemFoam/ic8h18/validation/Allrun
@@ -1,5 +1,4 @@
 #!/bin/sh
-
 cd ${0%/*} || exit 1    # Run from this directory
 
 # Extract Chemkin II data into a friendlier format
@@ -10,5 +9,3 @@ grep '^ Time (sec)' ../chemkin/senk.out | awk '{print $4 "    " $8 }' \
 ./createGraph
 
 #------------------------------------------------------------------------------
-
-
diff --git a/tutorials/combustion/chemFoam/ic8h18_TDAC/Allrun b/tutorials/combustion/chemFoam/ic8h18_TDAC/Allrun
index 62adab28f34..a90b3d865ce 100755
--- a/tutorials/combustion/chemFoam/ic8h18_TDAC/Allrun
+++ b/tutorials/combustion/chemFoam/ic8h18_TDAC/Allrun
@@ -4,10 +4,7 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
-# Set application name
-application=`getApplication`
-
-runApplication $application
+runApplication $(getApplication)
 
 (cd validation && ./Allrun $*)
 
diff --git a/tutorials/combustion/chemFoam/ic8h18_TDAC/validation/Allrun b/tutorials/combustion/chemFoam/ic8h18_TDAC/validation/Allrun
index 0720352189f..041628b097f 100755
--- a/tutorials/combustion/chemFoam/ic8h18_TDAC/validation/Allrun
+++ b/tutorials/combustion/chemFoam/ic8h18_TDAC/validation/Allrun
@@ -1,5 +1,4 @@
 #!/bin/sh
-
 cd ${0%/*} || exit 1    # Run from this directory
 
 # Extract Chemkin II data into a friendlier format
@@ -10,5 +9,3 @@ grep '^ Time (sec)' ../chemkin/senk.out | awk '{print $4 "    " $8 }' \
 ./createGraph
 
 #------------------------------------------------------------------------------
-
-
diff --git a/tutorials/combustion/chemFoam/nc7h16/Allrun b/tutorials/combustion/chemFoam/nc7h16/Allrun
index de26a4017d4..a90b3d865ce 100755
--- a/tutorials/combustion/chemFoam/nc7h16/Allrun
+++ b/tutorials/combustion/chemFoam/nc7h16/Allrun
@@ -4,10 +4,7 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
-# Set application name
-application=$(getApplication)
-
-runApplication $application
+runApplication $(getApplication)
 
 (cd validation && ./Allrun $*)
 
diff --git a/tutorials/combustion/chemFoam/nc7h16/validation/Allrun b/tutorials/combustion/chemFoam/nc7h16/validation/Allrun
index 0720352189f..041628b097f 100755
--- a/tutorials/combustion/chemFoam/nc7h16/validation/Allrun
+++ b/tutorials/combustion/chemFoam/nc7h16/validation/Allrun
@@ -1,5 +1,4 @@
 #!/bin/sh
-
 cd ${0%/*} || exit 1    # Run from this directory
 
 # Extract Chemkin II data into a friendlier format
@@ -10,5 +9,3 @@ grep '^ Time (sec)' ../chemkin/senk.out | awk '{print $4 "    " $8 }' \
 ./createGraph
 
 #------------------------------------------------------------------------------
-
-
diff --git a/tutorials/combustion/engineFoam/kivaTest/Allrun b/tutorials/combustion/engineFoam/kivaTest/Allrun
index 33555b48098..d5434dff007 100755
--- a/tutorials/combustion/engineFoam/kivaTest/Allrun
+++ b/tutorials/combustion/engineFoam/kivaTest/Allrun
@@ -4,11 +4,7 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
-# Get application name
-application=$(getApplication)
-
 runApplication kivaToFoam -file otape17
-
-runApplication $application
+runApplication $(getApplication)
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/combustion/fireFoam/LES/compartmentFire/Allclean b/tutorials/combustion/fireFoam/LES/compartmentFire/Allclean
index be64e41b64f..b333961d48f 100755
--- a/tutorials/combustion/fireFoam/LES/compartmentFire/Allclean
+++ b/tutorials/combustion/fireFoam/LES/compartmentFire/Allclean
@@ -1,5 +1,5 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1    # Run from this directory
 
 # Source tutorial clean functions
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
diff --git a/tutorials/combustion/fireFoam/LES/compartmentFire/Allrun b/tutorials/combustion/fireFoam/LES/compartmentFire/Allrun
index f4139300d2f..1fb613fedb3 100755
--- a/tutorials/combustion/fireFoam/LES/compartmentFire/Allrun
+++ b/tutorials/combustion/fireFoam/LES/compartmentFire/Allrun
@@ -1,5 +1,5 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1    # Run from this directory
 
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
@@ -23,6 +23,6 @@ runParallel $(getApplication)
 paraFoam -touch
 paraFoam -touch -region panelRegion
 
-(cd validation && ./crateGraphs)
+(cd validation && ./createGraphs)
 
 # -----------------------------------------------------------------------------
diff --git a/tutorials/combustion/fireFoam/LES/oppositeBurningPanels/Allrun b/tutorials/combustion/fireFoam/LES/oppositeBurningPanels/Allrun
index c153fe65d5b..c46299855a1 100755
--- a/tutorials/combustion/fireFoam/LES/oppositeBurningPanels/Allrun
+++ b/tutorials/combustion/fireFoam/LES/oppositeBurningPanels/Allrun
@@ -4,9 +4,6 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
-# Set application name
-application=$(getApplication)
-
 runApplication blockMesh
 
 runApplication -s cRefine \
diff --git a/tutorials/combustion/fireFoam/LES/simplePMMApanel/Allclean b/tutorials/combustion/fireFoam/LES/simplePMMApanel/Allclean
index be64e41b64f..b333961d48f 100755
--- a/tutorials/combustion/fireFoam/LES/simplePMMApanel/Allclean
+++ b/tutorials/combustion/fireFoam/LES/simplePMMApanel/Allclean
@@ -1,5 +1,5 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1    # Run from this directory
 
 # Source tutorial clean functions
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
diff --git a/tutorials/combustion/fireFoam/LES/simplePMMApanel/Allrun b/tutorials/combustion/fireFoam/LES/simplePMMApanel/Allrun
index 9a56766a61c..ba88bc10f31 100755
--- a/tutorials/combustion/fireFoam/LES/simplePMMApanel/Allrun
+++ b/tutorials/combustion/fireFoam/LES/simplePMMApanel/Allrun
@@ -1,16 +1,12 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1    # Run from this directory
 
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
 runApplication blockMesh
-
 runApplication topoSet
-
 runApplication extrudeToRegionMesh -overwrite
-
-# Run
 runApplication $(getApplication)
 
 paraFoam -touchAll
diff --git a/tutorials/combustion/fireFoam/LES/smallPoolFire2D/Allrun b/tutorials/combustion/fireFoam/LES/smallPoolFire2D/Allrun
index 819d8380acb..942f56f2ec9 100755
--- a/tutorials/combustion/fireFoam/LES/smallPoolFire2D/Allrun
+++ b/tutorials/combustion/fireFoam/LES/smallPoolFire2D/Allrun
@@ -1,7 +1,6 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # Run from this directory
 
-
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
@@ -11,7 +10,6 @@ runApplication createPatch -overwrite
 
 cp 0/ph_rgh.orig 0/ph_rgh
 
-# Run
 runApplication $(getApplication)
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/combustion/fireFoam/LES/smallPoolFire3D/Allrun b/tutorials/combustion/fireFoam/LES/smallPoolFire3D/Allrun
index aaab3e36d7d..8c42b7a25ef 100755
--- a/tutorials/combustion/fireFoam/LES/smallPoolFire3D/Allrun
+++ b/tutorials/combustion/fireFoam/LES/smallPoolFire3D/Allrun
@@ -1,11 +1,9 @@
 #!/bin/sh
+cd ${0%/*} || exit 1    # Run from this directory
 
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
-# Set application name
-application=$(getApplication)
-
 runApplication blockMesh
 runApplication topoSet
 runApplication createPatch -overwrite
@@ -13,8 +11,6 @@ runApplication createPatch -overwrite
 cp 0/ph_rgh.orig 0/ph_rgh
 
 runApplication decomposePar -force
-
-# Run
-runParallel $application
+runParallel $(getApplication)
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/compressible/rhoPimpleFoam/RAS/angledDuct/Allrun b/tutorials/compressible/rhoPimpleFoam/RAS/angledDuct/Allrun
index 4f55fd7efaf..ccdfefe5c1c 100755
--- a/tutorials/compressible/rhoPimpleFoam/RAS/angledDuct/Allrun
+++ b/tutorials/compressible/rhoPimpleFoam/RAS/angledDuct/Allrun
@@ -1,10 +1,12 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # Run from this directory
 
-m4 system/blockMeshDict.m4 > system/blockMeshDict
-
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
+m4 system/blockMeshDict.m4 > system/blockMeshDict
+
 runApplication blockMesh
 runApplication $(getApplication)
+
+#------------------------------------------------------------------------------
diff --git a/tutorials/compressible/rhoPimpleFoam/RAS/angledDuctLTS/Allrun b/tutorials/compressible/rhoPimpleFoam/RAS/angledDuctLTS/Allrun
index 4f55fd7efaf..ccdfefe5c1c 100755
--- a/tutorials/compressible/rhoPimpleFoam/RAS/angledDuctLTS/Allrun
+++ b/tutorials/compressible/rhoPimpleFoam/RAS/angledDuctLTS/Allrun
@@ -1,10 +1,12 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # Run from this directory
 
-m4 system/blockMeshDict.m4 > system/blockMeshDict
-
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
+m4 system/blockMeshDict.m4 > system/blockMeshDict
+
 runApplication blockMesh
 runApplication $(getApplication)
+
+#------------------------------------------------------------------------------
diff --git a/tutorials/compressible/rhoPimpleFoam/RAS/mixerVessel2D/Allrun b/tutorials/compressible/rhoPimpleFoam/RAS/mixerVessel2D/Allrun
index 2e9c3f7fb3a..52b2a4941d7 100755
--- a/tutorials/compressible/rhoPimpleFoam/RAS/mixerVessel2D/Allrun
+++ b/tutorials/compressible/rhoPimpleFoam/RAS/mixerVessel2D/Allrun
@@ -1,9 +1,10 @@
 #!/bin/sh
+cd ${0%/*} || exit 1    # Run from this directory
 
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
-application=$(getApplication)
-
 ./makeMesh
-runApplication $application
+runApplication $(getApplication)
+
+#------------------------------------------------------------------------------
diff --git a/tutorials/compressible/rhoPimpleFoam/laminar/helmholtzResonance/Allrun b/tutorials/compressible/rhoPimpleFoam/laminar/helmholtzResonance/Allrun
index 78bf41821af..0e680451304 100755
--- a/tutorials/compressible/rhoPimpleFoam/laminar/helmholtzResonance/Allrun
+++ b/tutorials/compressible/rhoPimpleFoam/laminar/helmholtzResonance/Allrun
@@ -1,9 +1,10 @@
 #!/bin/sh
+cd ${0%/*} || exit 1    # Run from this directory
 
-cd ${0%/*} || exit 1
-
+# Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
+
 # Run function links the appropriate mesh files and clones the case
 run()
 {
@@ -45,3 +46,5 @@ plot \
     "modelled/postProcessing/probes/0/p" us 1:(\$4-1e5) t "Modelled Plenum" w l
 
 EOF
+
+#------------------------------------------------------------------------------
diff --git a/tutorials/compressible/rhoPimpleFoam/laminar/sineWaveDamping/Allrun b/tutorials/compressible/rhoPimpleFoam/laminar/sineWaveDamping/Allrun
index 31f6bc34d0f..8a77ff80763 100755
--- a/tutorials/compressible/rhoPimpleFoam/laminar/sineWaveDamping/Allrun
+++ b/tutorials/compressible/rhoPimpleFoam/laminar/sineWaveDamping/Allrun
@@ -6,3 +6,5 @@ cd ${0%/*} || exit 1    # Run from this directory
 
 runApplication blockMesh
 runApplication $(getApplication)
+
+#------------------------------------------------------------------------------
diff --git a/tutorials/compressible/rhoSimpleFoam/angledDuctExplicitFixedCoeff/Allrun b/tutorials/compressible/rhoSimpleFoam/angledDuctExplicitFixedCoeff/Allrun
index bb18fc3feba..ccdfefe5c1c 100755
--- a/tutorials/compressible/rhoSimpleFoam/angledDuctExplicitFixedCoeff/Allrun
+++ b/tutorials/compressible/rhoSimpleFoam/angledDuctExplicitFixedCoeff/Allrun
@@ -1,14 +1,12 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # Run from this directory
 
-m4 system/blockMeshDict.m4 > system/blockMeshDict
-
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
-application=$(getApplication)
+m4 system/blockMeshDict.m4 > system/blockMeshDict
 
 runApplication blockMesh
-runApplication $application
+runApplication $(getApplication)
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/compressible/sonicFoam/laminar/shockTube/Allrun b/tutorials/compressible/sonicFoam/laminar/shockTube/Allrun
index 8c093a9abed..4a38818ccc6 100755
--- a/tutorials/compressible/sonicFoam/laminar/shockTube/Allrun
+++ b/tutorials/compressible/sonicFoam/laminar/shockTube/Allrun
@@ -4,12 +4,10 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
-application=$(getApplication)
-
 restore0Dir
 runApplication blockMesh
 runApplication setFields
-runApplication $application
+runApplication $(getApplication)
 runApplication -s sample  postProcess -func sample
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/Allrun b/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/Allrun
index 3d5ec5cbd9f..d433a8c0269 100755
--- a/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/Allrun
+++ b/tutorials/discreteMethods/dsmcFoam/wedge15Ma5/Allrun
@@ -10,5 +10,4 @@ runParallel dsmcInitialise
 runParallel $(getApplication)
 runApplication reconstructPar -noLagrangian
 
-
 #------------------------------------------------------------------------------
diff --git a/tutorials/discreteMethods/molecularDynamics/mdFoam/nanoNozzle/Allrun b/tutorials/discreteMethods/molecularDynamics/mdFoam/nanoNozzle/Allrun
index c373ee10797..66482be7d4b 100755
--- a/tutorials/discreteMethods/molecularDynamics/mdFoam/nanoNozzle/Allrun
+++ b/tutorials/discreteMethods/molecularDynamics/mdFoam/nanoNozzle/Allrun
@@ -1,18 +1,14 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # Run from this directory
 
-
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
-application=$(getApplication)
-
 runApplication blockMesh
-
 runApplication decomposePar
 
 runParallel mdInitialise
-runParallel $application
+runParallel $(getApplication)
 
 runApplication reconstructPar
 
diff --git a/tutorials/electromagnetics/mhdFoam/hartmann/Allrun b/tutorials/electromagnetics/mhdFoam/hartmann/Allrun
index 332db2c7bfc..8bf5318684b 100755
--- a/tutorials/electromagnetics/mhdFoam/hartmann/Allrun
+++ b/tutorials/electromagnetics/mhdFoam/hartmann/Allrun
@@ -4,11 +4,8 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
-# Set application name
-application=$(getApplication)
-
 runApplication blockMesh
-runApplication $application
+runApplication $(getApplication)
 runApplication -s sample  postProcess -func sample
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/Allrun b/tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/Allrun
index 96d54eb8092..ac13b064274 100755
--- a/tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/Allrun
+++ b/tutorials/heatTransfer/buoyantBoussinesqPimpleFoam/hotRoom/Allrun
@@ -4,11 +4,9 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
-application=$(getApplication)
-
 runApplication blockMesh
 \cp 0/T.orig 0/T
 runApplication setFields
-runApplication $application
+runApplication $(getApplication)
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/Allrun b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/Allrun
index 96d54eb8092..ac13b064274 100755
--- a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/Allrun
+++ b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom/Allrun
@@ -4,11 +4,9 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
-application=$(getApplication)
-
 runApplication blockMesh
 \cp 0/T.orig 0/T
 runApplication setFields
-runApplication $application
+runApplication $(getApplication)
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/heatTransfer/buoyantPimpleFoam/thermocoupleTestCase/Allrun b/tutorials/heatTransfer/buoyantPimpleFoam/thermocoupleTestCase/Allrun
index 87eba62518a..8a77ff80763 100755
--- a/tutorials/heatTransfer/buoyantPimpleFoam/thermocoupleTestCase/Allrun
+++ b/tutorials/heatTransfer/buoyantPimpleFoam/thermocoupleTestCase/Allrun
@@ -4,10 +4,7 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
-# Get application name
-application=$(getApplication)
-
 runApplication blockMesh
-runApplication $application
+runApplication $(getApplication)
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/Allrun b/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/Allrun
index c751c9789ba..07d3f0e272d 100755
--- a/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/Allrun
+++ b/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/Allrun
@@ -4,11 +4,8 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
-# Set application name
-application=$(getApplication)
-
 runApplication blockMesh
-runApplication $application
+runApplication $(getApplication)
 runApplication -s sample  postProcess -latestTime -func sample
 
 ( cd validation && ./createGraphs )
diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/Allrun b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/Allrun
index ae95e9ed617..1927ad7c820 100755
--- a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/Allrun
+++ b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/Allrun
@@ -1,8 +1,8 @@
 #!/bin/sh
-. $WM_PROJECT_DIR/bin/tools/RunFunctions
+cd ${0%/*} || exit 1    # Run from this directory
 
-# Get application name
-application=$(getApplication)
+# Source tutorial run functions
+. $WM_PROJECT_DIR/bin/tools/RunFunctions
 
 runApplication blockMesh
 
@@ -11,4 +11,6 @@ restore0Dir
 # Create 1D and 3D baffles
 runApplication createBaffles -overwrite
 
-runApplication $application
+runApplication $(getApplication)
+
+#------------------------------------------------------------------------------
diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoom/Allrun b/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoom/Allrun
index ebc19b3d2a4..8a77ff80763 100755
--- a/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoom/Allrun
+++ b/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoom/Allrun
@@ -4,9 +4,7 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
-application=$(getApplication)
-
 runApplication blockMesh
-runApplication $application
+runApplication $(getApplication)
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoomFvDOM/Allrun b/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoomFvDOM/Allrun
index ebc19b3d2a4..8a77ff80763 100755
--- a/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoomFvDOM/Allrun
+++ b/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoomFvDOM/Allrun
@@ -4,9 +4,7 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
-application=$(getApplication)
-
 runApplication blockMesh
-runApplication $application
+runApplication $(getApplication)
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/externalSolarLoad/Allclean b/tutorials/heatTransfer/chtMultiRegionFoam/externalSolarLoad/Allclean
index 4d24110e3a5..77d28a7dac0 100755
--- a/tutorials/heatTransfer/chtMultiRegionFoam/externalSolarLoad/Allclean
+++ b/tutorials/heatTransfer/chtMultiRegionFoam/externalSolarLoad/Allclean
@@ -1,5 +1,5 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1    # Run from this directory
 
 # Source tutorial clean functions
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/externalSolarLoad/Allrun b/tutorials/heatTransfer/chtMultiRegionFoam/externalSolarLoad/Allrun
index 4ab71d56f14..c20d1cd3be0 100755
--- a/tutorials/heatTransfer/chtMultiRegionFoam/externalSolarLoad/Allrun
+++ b/tutorials/heatTransfer/chtMultiRegionFoam/externalSolarLoad/Allrun
@@ -1,5 +1,5 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1    # Run from this directory
 
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/externalSolarLoad/Allrun.pre b/tutorials/heatTransfer/chtMultiRegionFoam/externalSolarLoad/Allrun.pre
index 9ab5e3c25a3..a7367af14af 100755
--- a/tutorials/heatTransfer/chtMultiRegionFoam/externalSolarLoad/Allrun.pre
+++ b/tutorials/heatTransfer/chtMultiRegionFoam/externalSolarLoad/Allrun.pre
@@ -1,5 +1,5 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1    # Run from this directory
 
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/Allrun b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/Allrun
index 8d53d67ebef..619f8c0af0a 100755
--- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/Allrun
+++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/Allrun
@@ -1,7 +1,6 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # Run from this directory
 
-
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/Allrun b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/Allrun
index c21e4adafc5..e46f7210888 100755
--- a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/Allrun
+++ b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/Allrun
@@ -1,7 +1,6 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # Run from this directory
 
-
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/windshieldCondensation/Allrun b/tutorials/heatTransfer/chtMultiRegionFoam/windshieldCondensation/Allrun
index b75fde5c9ae..7704bd9ea55 100755
--- a/tutorials/heatTransfer/chtMultiRegionFoam/windshieldCondensation/Allrun
+++ b/tutorials/heatTransfer/chtMultiRegionFoam/windshieldCondensation/Allrun
@@ -24,3 +24,5 @@ runApplication topoSet -region cabin -dict system/topoSetDictRegister
 restore0Dir
 
 runApplication $(getApplication)
+
+#------------------------------------------------------------------------------
diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/windshieldDefrost/Allrun b/tutorials/heatTransfer/chtMultiRegionFoam/windshieldDefrost/Allrun
index 25d83d176d8..f4d82024cdb 100755
--- a/tutorials/heatTransfer/chtMultiRegionFoam/windshieldDefrost/Allrun
+++ b/tutorials/heatTransfer/chtMultiRegionFoam/windshieldDefrost/Allrun
@@ -7,3 +7,5 @@ cd ${0%/*} || exit 1    # Run from this directory
 ./Allrun.pre
 
 runApplication $(getApplication)
+
+# -----------------------------------------------------------------------------
diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/windshieldDefrost/Allrun-parallel b/tutorials/heatTransfer/chtMultiRegionFoam/windshieldDefrost/Allrun-parallel
index ba2fd3c6bb1..4ec7e69c221 100755
--- a/tutorials/heatTransfer/chtMultiRegionFoam/windshieldDefrost/Allrun-parallel
+++ b/tutorials/heatTransfer/chtMultiRegionFoam/windshieldDefrost/Allrun-parallel
@@ -6,17 +6,17 @@ cd ${0%/*} || exit 1    # Run from this directory
 
 ./Allrun.pre
 
-# Set application name
-application=$(getApplication)
-
-# decompose
+# Decompose
 runApplication -s cabin decomposePar -region cabin
 runApplication -s ice decomposePar -region ice
 runApplication -s exterior decomposePar -region exterior
 
-runParallel $application
+runParallel $(getApplication)
 
+# Reconstruct
 runApplication -s cabin reconstructPar -region cabin
 runApplication -s ice reconstructPar -region ice
 runApplication -s exterior reconstructPar -region exterior
 
+
+# -----------------------------------------------------------------------------
diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/windshieldDefrost/Allrun.pre b/tutorials/heatTransfer/chtMultiRegionFoam/windshieldDefrost/Allrun.pre
index 0818ebd1a40..44fa75f381c 100755
--- a/tutorials/heatTransfer/chtMultiRegionFoam/windshieldDefrost/Allrun.pre
+++ b/tutorials/heatTransfer/chtMultiRegionFoam/windshieldDefrost/Allrun.pre
@@ -18,3 +18,5 @@ runApplication splitMeshRegions -cellZones -overwrite
 
 # set the initial fields
 restore0Dir
+
+# -----------------------------------------------------------------------------
diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/Allrun b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/Allrun
index c6e1de86782..f4d82024cdb 100755
--- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/Allrun
+++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/Allrun
@@ -1,10 +1,11 @@
 #!/bin/sh
-
 cd ${0%/*} || exit 1    # Run from this directory
 
-./Allrun.pre
-
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
+./Allrun.pre
+
 runApplication $(getApplication)
+
+# -----------------------------------------------------------------------------
diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/Allrun-parallel b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/Allrun-parallel
index 9e5b931edcb..2be2e1edda0 100755
--- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/Allrun-parallel
+++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/Allrun-parallel
@@ -1,5 +1,4 @@
 #!/bin/sh
-
 cd ${0%/*} || exit 1    # Run from this directory
 
 # Source tutorial run functions
@@ -14,3 +13,5 @@ runParallel $(getApplication)
 
 runApplication -s air    reconstructPar -latestTime -region air
 runApplication -s porous reconstructPar -latestTime -region porous
+
+# -----------------------------------------------------------------------------
diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/Allrun.pre b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/Allrun.pre
index 9780d15756a..6d3c8f35440 100755
--- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/Allrun.pre
+++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/Allrun.pre
@@ -25,3 +25,5 @@ paraFoam -touch -region porous
 paraFoam -touch -region air
 
 restore0Dir
+
+# -----------------------------------------------------------------------------
diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/Allrun b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/Allrun
index 8224dffa9ce..50db130fe23 100755
--- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/Allrun
+++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/Allrun
@@ -1,7 +1,6 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # Run from this directory
 
-
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
@@ -28,8 +27,6 @@ done
 
 runApplication $(getApplication)
 
-
-
 echo
 echo "creating files for paraview post-processing"
 echo
diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/Allrun-parallel b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/Allrun-parallel
index 919b7d0b75e..f8131b1da89 100755
--- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/Allrun-parallel
+++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/Allrun-parallel
@@ -1,7 +1,6 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # Run from this directory
 
-
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
@@ -36,7 +35,6 @@ runParallel $(getApplication)
 runApplication reconstructPar -allRegions
 
 
-
 echo
 echo "creating files for paraview post-processing"
 echo
diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/Allrun.pre b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/Allrun.pre
index 22b2e59f126..e7adbdd5bc0 100755
--- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/Allrun.pre
+++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/Allrun.pre
@@ -1,7 +1,6 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # Run from this directory
 
-
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
diff --git a/tutorials/incompressible/SRFPimpleFoam/rotor2D/Allrun b/tutorials/incompressible/SRFPimpleFoam/rotor2D/Allrun
index 021754896d8..52b2a4941d7 100755
--- a/tutorials/incompressible/SRFPimpleFoam/rotor2D/Allrun
+++ b/tutorials/incompressible/SRFPimpleFoam/rotor2D/Allrun
@@ -4,9 +4,7 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
-application=$(getApplication)
-
 ./makeMesh
-runApplication $application
+runApplication $(getApplication)
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/icoFoam/cavityMappingTest/Allclean b/tutorials/incompressible/icoFoam/cavityMappingTest/Allclean
index b5eb7e0aafa..3512fe5e6eb 100755
--- a/tutorials/incompressible/icoFoam/cavityMappingTest/Allclean
+++ b/tutorials/incompressible/icoFoam/cavityMappingTest/Allclean
@@ -1,5 +1,5 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1    # Run from this directory
 
 # Source tutorial clean functions
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
diff --git a/tutorials/incompressible/icoFoam/cavityMappingTest/Allrun b/tutorials/incompressible/icoFoam/cavityMappingTest/Allrun
index 166a1200d59..767ff8591ff 100755
--- a/tutorials/incompressible/icoFoam/cavityMappingTest/Allrun
+++ b/tutorials/incompressible/icoFoam/cavityMappingTest/Allrun
@@ -1,5 +1,5 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1    # Run from this directory
 
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
@@ -13,3 +13,4 @@ runApplication -s fine blockMesh -dict system/blockMeshDict.fine
 
 runApplication $(getApplication)
 
+# -----------------------------------------------------------------------------
diff --git a/tutorials/incompressible/icoFoam/cavityMappingTest/Allrun-parallel b/tutorials/incompressible/icoFoam/cavityMappingTest/Allrun-parallel
index bd03d75d47d..2577f9c8669 100755
--- a/tutorials/incompressible/icoFoam/cavityMappingTest/Allrun-parallel
+++ b/tutorials/incompressible/icoFoam/cavityMappingTest/Allrun-parallel
@@ -1,5 +1,5 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1    # Run from this directory
 
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
@@ -20,3 +20,5 @@ runParallel $(getApplication)
 #runApplication -s fine reconstructPar
 #
 #runApplication -s coarseMesh reconstructPar -region coarseMesh
+
+# -----------------------------------------------------------------------------
diff --git a/tutorials/incompressible/icoFoam/elbow/Allrun b/tutorials/incompressible/icoFoam/elbow/Allrun
index 6da96f6a744..d4774871961 100755
--- a/tutorials/incompressible/icoFoam/elbow/Allrun
+++ b/tutorials/incompressible/icoFoam/elbow/Allrun
@@ -4,11 +4,9 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
-# Get application directory
-application=$(getApplication)
 
 runApplication fluentMeshToFoam elbow.msh
-runApplication "$application"
+runApplication $(getApplication)
 runApplication foamMeshToFluent
 runApplication foamDataToFluent
 
diff --git a/tutorials/incompressible/pimpleDyMFoam/mixerVesselAMI2D/Allrun b/tutorials/incompressible/pimpleDyMFoam/mixerVesselAMI2D/Allrun
index c454c9b3f63..162255286a9 100755
--- a/tutorials/incompressible/pimpleDyMFoam/mixerVesselAMI2D/Allrun
+++ b/tutorials/incompressible/pimpleDyMFoam/mixerVesselAMI2D/Allrun
@@ -4,13 +4,11 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
-application=$(getApplication)
-
 ./makeMesh
 
-#runApplication $application
+#runApplication $(getApplication)
 runApplication decomposePar
-runParallel $application
+runParallel $(getApplication)
 runApplication reconstructPar
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/pimpleDyMFoam/oscillatingInletACMI2D/Allrun b/tutorials/incompressible/pimpleDyMFoam/oscillatingInletACMI2D/Allrun
index 25d83d176d8..f4d82024cdb 100755
--- a/tutorials/incompressible/pimpleDyMFoam/oscillatingInletACMI2D/Allrun
+++ b/tutorials/incompressible/pimpleDyMFoam/oscillatingInletACMI2D/Allrun
@@ -7,3 +7,5 @@ cd ${0%/*} || exit 1    # Run from this directory
 ./Allrun.pre
 
 runApplication $(getApplication)
+
+# -----------------------------------------------------------------------------
diff --git a/tutorials/incompressible/pimpleDyMFoam/oscillatingInletACMI2D/Allrun-parallel b/tutorials/incompressible/pimpleDyMFoam/oscillatingInletACMI2D/Allrun-parallel
index 3f7cab5d82e..51af1fb48a6 100755
--- a/tutorials/incompressible/pimpleDyMFoam/oscillatingInletACMI2D/Allrun-parallel
+++ b/tutorials/incompressible/pimpleDyMFoam/oscillatingInletACMI2D/Allrun-parallel
@@ -7,7 +7,7 @@ cd ${0%/*} || exit 1    # Run from this directory
 ./Allrun.pre
 
 runApplication decomposePar
-
 runParallel $(getApplication)
-
 runApplication reconstructPar
+
+# -----------------------------------------------------------------------------
diff --git a/tutorials/incompressible/pimpleDyMFoam/oscillatingInletACMI2D/Allrun.pre b/tutorials/incompressible/pimpleDyMFoam/oscillatingInletACMI2D/Allrun.pre
index 54810277068..c484c19d159 100755
--- a/tutorials/incompressible/pimpleDyMFoam/oscillatingInletACMI2D/Allrun.pre
+++ b/tutorials/incompressible/pimpleDyMFoam/oscillatingInletACMI2D/Allrun.pre
@@ -12,3 +12,5 @@ runApplication topoSet -constant
 runApplication createBaffles -overwrite
 
 restore0Dir
+
+# -----------------------------------------------------------------------------
diff --git a/tutorials/incompressible/pimpleDyMFoam/propeller/Allrun b/tutorials/incompressible/pimpleDyMFoam/propeller/Allrun
index 3f7cab5d82e..51af1fb48a6 100755
--- a/tutorials/incompressible/pimpleDyMFoam/propeller/Allrun
+++ b/tutorials/incompressible/pimpleDyMFoam/propeller/Allrun
@@ -7,7 +7,7 @@ cd ${0%/*} || exit 1    # Run from this directory
 ./Allrun.pre
 
 runApplication decomposePar
-
 runParallel $(getApplication)
-
 runApplication reconstructPar
+
+# -----------------------------------------------------------------------------
diff --git a/tutorials/incompressible/pimpleFoam/LES/channel395/Allrun b/tutorials/incompressible/pimpleFoam/LES/channel395/Allrun
index c34f2384400..8d10da5a1f4 100755
--- a/tutorials/incompressible/pimpleFoam/LES/channel395/Allrun
+++ b/tutorials/incompressible/pimpleFoam/LES/channel395/Allrun
@@ -4,17 +4,15 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
-# Get application directory
-application=$(getApplication)
 
 runApplication blockMesh
 
 #- Run serial
-#runApplication $application
+#runApplication $(getApplication)
 
 #- Run parallel
 runApplication decomposePar -cellDist
-runParallel $application
+runParallel $(getApplication)
 runApplication reconstructPar
 
 runApplication postChannel
diff --git a/tutorials/incompressible/pimpleFoam/RAS/TJunctionFan/Allrun b/tutorials/incompressible/pimpleFoam/RAS/TJunctionFan/Allrun
index 827542cfc5a..1492c40ae09 100755
--- a/tutorials/incompressible/pimpleFoam/RAS/TJunctionFan/Allrun
+++ b/tutorials/incompressible/pimpleFoam/RAS/TJunctionFan/Allrun
@@ -1,10 +1,9 @@
 #!/bin/sh
+cd ${0%/*} || exit 1    # Run from this directory
 
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
-# Get application name
-application=$(getApplication)
 
 runApplication blockMesh
 
@@ -16,4 +15,6 @@ restore0Dir
 # Create wall and cyclic baffles and the fields on them
 runApplication createBaffles -overwrite
 
-runApplication $application
+runApplication $(getApplication)
+
+# -----------------------------------------------------------------------------
diff --git a/tutorials/incompressible/pimpleFoam/RAS/elipsekkLOmega/Allrun b/tutorials/incompressible/pimpleFoam/RAS/elipsekkLOmega/Allrun
index 05b7969601d..a1f6b6bbb67 100755
--- a/tutorials/incompressible/pimpleFoam/RAS/elipsekkLOmega/Allrun
+++ b/tutorials/incompressible/pimpleFoam/RAS/elipsekkLOmega/Allrun
@@ -4,23 +4,20 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
-# Get application directory
-application=$(getApplication)
 
 runApplication blockMesh
 runApplication transformPoints -scale '(1.6666 1 1)'
 
 runApplication changeDictionary -instance system -dict system/changeDictionaryDict.X
 runApplication mirrorMesh -overwrite
-rm log.mirrorMesh
+rm -f log.mirrorMesh
+rm -f log.changeDictionary
 
-rm log.changeDictionary
 runApplication changeDictionary -instance system -dict system/changeDictionaryDict.Y
-
 runApplication mirrorMesh -overwrite
 
 runApplication topoSet
 runApplication createPatch -overwrite
-runApplication $application
+runApplication $(getApplication)
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/pimpleFoam/channel395DFSEM/Allrun b/tutorials/incompressible/pimpleFoam/channel395DFSEM/Allrun
index f9a700b1f01..5d8a22acc0b 100755
--- a/tutorials/incompressible/pimpleFoam/channel395DFSEM/Allrun
+++ b/tutorials/incompressible/pimpleFoam/channel395DFSEM/Allrun
@@ -1,20 +1,17 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1    # Run from this directory
 
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
-# Get application directory
-application=$(getApplication)
-
 runApplication blockMesh
 
 #- Run serial
-#runApplication $application
+#runApplication $(getApplication)
 
 #- Run parallel
 runApplication decomposePar -cellDist
-runParallel $application
+runParallel $(getApplication)
 #runApplication reconstructPar -latestTime
 
 # -----------------------------------------------------------------------------
diff --git a/tutorials/incompressible/pisoFoam/LES/motorBike/lesFiles/Allrun b/tutorials/incompressible/pisoFoam/LES/motorBike/lesFiles/Allrun
index d6423dc58b1..e18982c7e64 100755
--- a/tutorials/incompressible/pisoFoam/LES/motorBike/lesFiles/Allrun
+++ b/tutorials/incompressible/pisoFoam/LES/motorBike/lesFiles/Allrun
@@ -1,4 +1,5 @@
 #!/bin/sh
+cd ${0%/*} || exit 1    # Run from this directory
 
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
@@ -17,3 +18,5 @@ runParallel pisoFoam
 runApplication reconstructParMesh -constant -mergeTol 1e-6
 
 runApplication reconstructPar
+
+#------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/pisoFoam/laminar/porousBlockage/Allrun b/tutorials/incompressible/pisoFoam/laminar/porousBlockage/Allrun
index fe3da42bf4b..db65453658e 100755
--- a/tutorials/incompressible/pisoFoam/laminar/porousBlockage/Allrun
+++ b/tutorials/incompressible/pisoFoam/laminar/porousBlockage/Allrun
@@ -4,12 +4,8 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
-application=$(getApplication)
-
 runApplication blockMesh
-
 runApplication topoSet
-
-runApplication $application
+runApplication $(getApplication)
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/Allrun.pre b/tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/Allrun.pre
index 343d4f1efe1..33bf5258ce2 100755
--- a/tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/Allrun.pre
+++ b/tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/Allrun.pre
@@ -18,7 +18,7 @@ runApplication -s collapseFaces \
 
 runApplication checkMesh -allTopology -allGeometry -latestTime
 
-latestTime=`foamListTimes -latestTime`
+latestTime=$(foamListTimes -latestTime)
 
 # Move the mesh into polyMesh
 rm -rf constant/polyMesh
diff --git a/tutorials/incompressible/simpleFoam/T3A/Allrun b/tutorials/incompressible/simpleFoam/T3A/Allrun
index aa2f738b3ee..666bf88e7e4 100755
--- a/tutorials/incompressible/simpleFoam/T3A/Allrun
+++ b/tutorials/incompressible/simpleFoam/T3A/Allrun
@@ -4,11 +4,8 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
-# Set application name
-application=`getApplication`
-
 runApplication blockMesh
-runApplication $application
+runApplication $(getApplication)
 
 ( cd validation && ./createGraphs )
 
diff --git a/tutorials/incompressible/simpleFoam/airFoil2D/Allrun b/tutorials/incompressible/simpleFoam/airFoil2D/Allrun
index 89647850f52..c96f61d7ef3 100755
--- a/tutorials/incompressible/simpleFoam/airFoil2D/Allrun
+++ b/tutorials/incompressible/simpleFoam/airFoil2D/Allrun
@@ -4,8 +4,6 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
-application=$(getApplication)
-
-runApplication $application
+runApplication $(getApplication)
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/simpleFoam/mixerVessel2D/Allrun b/tutorials/incompressible/simpleFoam/mixerVessel2D/Allrun
index 021754896d8..52b2a4941d7 100755
--- a/tutorials/incompressible/simpleFoam/mixerVessel2D/Allrun
+++ b/tutorials/incompressible/simpleFoam/mixerVessel2D/Allrun
@@ -4,9 +4,7 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
-application=$(getApplication)
-
 ./makeMesh
-runApplication $application
+runApplication $(getApplication)
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/incompressible/simpleFoam/motorBike/Allclean b/tutorials/incompressible/simpleFoam/motorBike/Allclean
index 959198cb951..1dca1e06777 100755
--- a/tutorials/incompressible/simpleFoam/motorBike/Allclean
+++ b/tutorials/incompressible/simpleFoam/motorBike/Allclean
@@ -1,5 +1,5 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1    # Run from this directory
 
 # Source tutorial clean functions
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
diff --git a/tutorials/incompressible/simpleFoam/pipeCyclic/Allrun b/tutorials/incompressible/simpleFoam/pipeCyclic/Allrun
index 17041f20bcc..0cade47aa82 100755
--- a/tutorials/incompressible/simpleFoam/pipeCyclic/Allrun
+++ b/tutorials/incompressible/simpleFoam/pipeCyclic/Allrun
@@ -4,18 +4,15 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
-# Get application directory
-application=$(getApplication)
-
 runApplication blockMesh
 runApplication topoSet
 runApplication refineHexMesh c0 -overwrite
 
 restore0Dir
 
-#runApplication $application
+#runApplication $(getApplication)
 runApplication decomposePar -cellDist
-runParallel $application
+runParallel $(getApplication)
 
 runApplication reconstructPar
 
diff --git a/tutorials/incompressible/simpleFoam/rotorDisk/Allclean b/tutorials/incompressible/simpleFoam/rotorDisk/Allclean
index f68257aae3e..47d0a0c0c11 100755
--- a/tutorials/incompressible/simpleFoam/rotorDisk/Allclean
+++ b/tutorials/incompressible/simpleFoam/rotorDisk/Allclean
@@ -1,5 +1,5 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1    # Run from this directory
 
 # Source tutorial clean functions
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
diff --git a/tutorials/incompressible/simpleFoam/windAroundBuildings/Allclean b/tutorials/incompressible/simpleFoam/windAroundBuildings/Allclean
index 03ba09eaba0..8039a752640 100755
--- a/tutorials/incompressible/simpleFoam/windAroundBuildings/Allclean
+++ b/tutorials/incompressible/simpleFoam/windAroundBuildings/Allclean
@@ -1,5 +1,5 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1    # Run from this directory
 
 # Source tutorial clean functions
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
diff --git a/tutorials/incompressible/simpleFoam/windAroundBuildings/Allrun b/tutorials/incompressible/simpleFoam/windAroundBuildings/Allrun
index 753dd9c9429..06dc7a18c55 100755
--- a/tutorials/incompressible/simpleFoam/windAroundBuildings/Allrun
+++ b/tutorials/incompressible/simpleFoam/windAroundBuildings/Allrun
@@ -1,5 +1,5 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1    # Run from this directory
 
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
diff --git a/tutorials/lagrangian/MPPICFoam/cyclone/Allclean b/tutorials/lagrangian/MPPICFoam/cyclone/Allclean
index e7a7ea76ade..e274cef962b 100755
--- a/tutorials/lagrangian/MPPICFoam/cyclone/Allclean
+++ b/tutorials/lagrangian/MPPICFoam/cyclone/Allclean
@@ -1,5 +1,5 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1    # Run from this directory
 
 # Source tutorial clean functions
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
diff --git a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/Allrun b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/Allrun
index 1d01582b285..158fb0bf528 100755
--- a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/Allrun
+++ b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/Allrun
@@ -4,14 +4,12 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
-application=$(getApplication)
-
 # create mesh
 runApplication blockMesh
 
 # create ignition cells cellSet
 runApplication topoSet
 
-runApplication $application
+runApplication $(getApplication)
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/Allrun b/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/Allrun
index ebb4bc401cb..dbc0b12711c 100755
--- a/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/Allrun
+++ b/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/Allrun
@@ -1,10 +1,11 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # Run from this directory
 
+# Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
 ./Allrun.pre
 
-application=$(getApplication)
+runApplication $(getApplication)
 
-runApplication $application
+#------------------------------------------------------------------------------
diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/Allrun.pre b/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/Allrun.pre
index e4d467e68ee..1ad7fbb61c7 100755
--- a/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/Allrun.pre
+++ b/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/Allrun.pre
@@ -1,4 +1,7 @@
 #!/bin/sh
+cd ${0%/*} || exit 1    # Run from this directory
+
+# Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
 restore0Dir
@@ -11,3 +14,5 @@ runApplication extrudeToRegionMesh -overwrite
 
 paraFoam -touch
 paraFoam -touch -region wallFilmRegion
+
+#------------------------------------------------------------------------------
diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/Allrun b/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/Allrun
index fa03916abab..dbc0b12711c 100755
--- a/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/Allrun
+++ b/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/Allrun
@@ -6,6 +6,6 @@ cd ${0%/*} || exit 1    # Run from this directory
 
 ./Allrun.pre
 
-application=$(getApplication)
+runApplication $(getApplication)
 
-runApplication $application
+#------------------------------------------------------------------------------
diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/Allrun-parallel b/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/Allrun-parallel
index 7779179a354..a061f0da4c3 100755
--- a/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/Allrun-parallel
+++ b/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/Allrun-parallel
@@ -6,13 +6,12 @@ cd ${0%/*} || exit 1    # Run from this directory
 
 ./Allrun.pre
 
-application=$(getApplication)
-
 runApplication -s wallFilmRegion decomposePar -region wallFilmRegion
 runApplication -s primaryRegion  decomposePar
 
-runParallel $application
+runParallel $(getApplication)
 
 runApplication -s wallFilmRegion reconstructPar -region wallFilmRegion
 runApplication -s primaryRegion  reconstructPar
 
+#------------------------------------------------------------------------------
diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/Allrun.pre b/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/Allrun.pre
index 952860d444d..a9f16e526ad 100755
--- a/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/Allrun.pre
+++ b/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/Allrun.pre
@@ -33,3 +33,5 @@ find ./0 -maxdepth 1 -type f -exec \
 
 paraFoam -touch
 paraFoam -touch -region wallFilmRegion
+
+#------------------------------------------------------------------------------
diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/Allrun b/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/Allrun
index ebb4bc401cb..dbc0b12711c 100755
--- a/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/Allrun
+++ b/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/Allrun
@@ -1,10 +1,11 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # Run from this directory
 
+# Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
 ./Allrun.pre
 
-application=$(getApplication)
+runApplication $(getApplication)
 
-runApplication $application
+#------------------------------------------------------------------------------
diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/Allrun.pre b/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/Allrun.pre
index c82f75cd2dd..4ff21dad8e0 100755
--- a/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/Allrun.pre
+++ b/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/Allrun.pre
@@ -1,4 +1,7 @@
 #!/bin/sh
+cd ${0%/*} || exit 1    # Run from this directory
+
+# Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
 restore0Dir
@@ -12,3 +15,5 @@ runApplication extrudeToRegionMesh -overwrite
 
 paraFoam -touch
 paraFoam -touch -region wallFilmRegion
+
+#------------------------------------------------------------------------------
diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/Allrun b/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/Allrun
index ebb4bc401cb..dbc0b12711c 100755
--- a/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/Allrun
+++ b/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/Allrun
@@ -1,10 +1,11 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # Run from this directory
 
+# Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
 ./Allrun.pre
 
-application=$(getApplication)
+runApplication $(getApplication)
 
-runApplication $application
+#------------------------------------------------------------------------------
diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/Allrun.pre b/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/Allrun.pre
index 9292f83031b..00eed56aae6 100755
--- a/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/Allrun.pre
+++ b/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/Allrun.pre
@@ -1,4 +1,7 @@
 #!/bin/sh
+cd ${0%/*} || exit 1    # Run from this directory
+
+# Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
 restore0Dir
@@ -29,3 +32,5 @@ runApplication createPatch -region wallFilmRegion -overwrite
 
 paraFoam -touch
 paraFoam -touch -region wallFilmRegion
+
+#------------------------------------------------------------------------------
diff --git a/tutorials/mesh/foamyHexMesh/mixerVessel/Allrun-pre b/tutorials/mesh/foamyHexMesh/mixerVessel/Allrun-pre
index 51b38f7a83a..e2508db1925 100755
--- a/tutorials/mesh/foamyHexMesh/mixerVessel/Allrun-pre
+++ b/tutorials/mesh/foamyHexMesh/mixerVessel/Allrun-pre
@@ -16,8 +16,6 @@ intersectSurfaces()
         surfaceBooleanFeatures intersection "$@"
 }
 
-# Set application name
-application=$(getApplication)
 
 \rm -rf 0
 
diff --git a/tutorials/mesh/foamyHexMesh/mixerVessel/Allrun-simulation b/tutorials/mesh/foamyHexMesh/mixerVessel/Allrun-simulation
index 6cf13f98ce7..392878e5d3a 100755
--- a/tutorials/mesh/foamyHexMesh/mixerVessel/Allrun-simulation
+++ b/tutorials/mesh/foamyHexMesh/mixerVessel/Allrun-simulation
@@ -6,9 +6,6 @@ cd ${0%/*} || exit 1    # Run from this directory
 
 cp system/controlDict.flow system/controlDict
 
-# Set application name
-application=$(getApplication)
-
 rm -rf 0
 
 runApplication createBaffles -overwrite
@@ -17,7 +14,7 @@ runApplication mergeOrSplitBaffles -split -overwrite
 # Get rid of zero faced patches
 runApplication createPatch -overwrite
 
-# Copy fields after meshing to avoind the generation of unnecessary patch fields
+# Copy fields after meshing to avoid the generation of unnecessary patch fields
 restore0Dir
 
 # Initialize alpha
@@ -28,7 +25,7 @@ runApplication -s main \
     decomposePar -force
 
 # Run
-runParallel $application
+runParallel $(getApplication)
 
 # Reconstruct
 runApplication reconstructPar -noFunctionObjects
diff --git a/tutorials/mesh/foamyQuadMesh/OpenCFD/Allrun b/tutorials/mesh/foamyQuadMesh/OpenCFD/Allrun
index 8653b499f5f..cdd750415ca 100755
--- a/tutorials/mesh/foamyQuadMesh/OpenCFD/Allrun
+++ b/tutorials/mesh/foamyQuadMesh/OpenCFD/Allrun
@@ -16,5 +16,4 @@ runApplication foamyQuadMesh -overwrite
 runApplication extrude2DMesh -overwrite polyMesh2D
 runApplication checkMesh -allGeometry -allTopology -constant -noZero
 
-
 #------------------------------------------------------------------------------
diff --git a/tutorials/mesh/foamyQuadMesh/OpenCFD/Allrun-rhoCentralFoam b/tutorials/mesh/foamyQuadMesh/OpenCFD/Allrun-rhoCentralFoam
index 266fee9c0b4..56aef09d09b 100755
--- a/tutorials/mesh/foamyQuadMesh/OpenCFD/Allrun-rhoCentralFoam
+++ b/tutorials/mesh/foamyQuadMesh/OpenCFD/Allrun-rhoCentralFoam
@@ -11,5 +11,4 @@ runApplication decomposePar
 runParallel rhoCentralFoam
 runApplication reconstructPar
 
-
 #------------------------------------------------------------------------------
diff --git a/tutorials/mesh/foamyQuadMesh/jaggedBoundary/Allrun b/tutorials/mesh/foamyQuadMesh/jaggedBoundary/Allrun
index 150693b9fe4..5434248652e 100755
--- a/tutorials/mesh/foamyQuadMesh/jaggedBoundary/Allrun
+++ b/tutorials/mesh/foamyQuadMesh/jaggedBoundary/Allrun
@@ -9,5 +9,4 @@ runApplication foamyQuadMesh -overwrite
 runApplication extrude2DMesh -overwrite MeshedSurface
 runApplication checkMesh -allGeometry -allTopology -constant -noZero
 
-
 #------------------------------------------------------------------------------
diff --git a/tutorials/mesh/foamyQuadMesh/square/Allrun b/tutorials/mesh/foamyQuadMesh/square/Allrun
index 26543eaac4c..87a113fc126 100755
--- a/tutorials/mesh/foamyQuadMesh/square/Allrun
+++ b/tutorials/mesh/foamyQuadMesh/square/Allrun
@@ -9,5 +9,4 @@ runApplication foamyQuadMesh -overwrite
 runApplication extrude2DMesh -overwrite polyMesh2D
 runApplication checkMesh -allGeometry -allTopology -constant -noZero
 
-
 #------------------------------------------------------------------------------
diff --git a/tutorials/mesh/parallel/cavity/Allclean b/tutorials/mesh/parallel/cavity/Allclean
index 4ca786d36eb..1ddaee91ff1 100755
--- a/tutorials/mesh/parallel/cavity/Allclean
+++ b/tutorials/mesh/parallel/cavity/Allclean
@@ -1,5 +1,5 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1    # Run from this directory
 
 # Source tutorial clean functions
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
diff --git a/tutorials/mesh/snappyHexMesh/flange/Allrun b/tutorials/mesh/snappyHexMesh/flange/Allrun
index 49602feb6e7..cae2427078d 100755
--- a/tutorials/mesh/snappyHexMesh/flange/Allrun
+++ b/tutorials/mesh/snappyHexMesh/flange/Allrun
@@ -1,4 +1,6 @@
 #!/bin/sh
+cd ${0%/*} || exit 1    # Run from this directory
+
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
@@ -8,3 +10,5 @@ cp $FOAM_TUTORIALS/resources/geometry/flange.stl.gz constant/triSurface/
 runApplication blockMesh
 runApplication surfaceFeatureExtract
 runApplication snappyHexMesh -overwrite
+
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/MPPICInterFoam/twoPhasePachuka/Allrun b/tutorials/multiphase/MPPICInterFoam/twoPhasePachuka/Allrun
index 18e8f4ad3a6..73737743f25 100755
--- a/tutorials/multiphase/MPPICInterFoam/twoPhasePachuka/Allrun
+++ b/tutorials/multiphase/MPPICInterFoam/twoPhasePachuka/Allrun
@@ -4,9 +4,6 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
-# Set application name
-application=$(getApplication)
-
 # create the underlying block mesh
 m4 system/pachuka.m4 > system/blockMeshDict
 
diff --git a/tutorials/multiphase/cavitatingFoam/LES/throttle/Allrun b/tutorials/multiphase/cavitatingFoam/LES/throttle/Allrun
index 6ed1c6ba9b4..d399430e224 100755
--- a/tutorials/multiphase/cavitatingFoam/LES/throttle/Allrun
+++ b/tutorials/multiphase/cavitatingFoam/LES/throttle/Allrun
@@ -4,9 +4,6 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
-# Set application name
-application=$(getApplication)
-
 refineMeshByCellSet()
 {
    while [ $# -ge 1 ]
@@ -27,6 +24,6 @@ refineMeshByCellSet()
 
 runApplication blockMesh
 refineMeshByCellSet 1 2 3
-runApplication $application
+runApplication $(getApplication)
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/cavitatingFoam/LES/throttle3D/Allrun b/tutorials/multiphase/cavitatingFoam/LES/throttle3D/Allrun
index e020b8a0fc2..39816254dd4 100755
--- a/tutorials/multiphase/cavitatingFoam/LES/throttle3D/Allrun
+++ b/tutorials/multiphase/cavitatingFoam/LES/throttle3D/Allrun
@@ -4,9 +4,6 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
-# Set application name
-application=$(getApplication)
-
 refineMeshByCellSet()
 {
    while [ $# -ge 1 ]
@@ -34,7 +31,7 @@ refineMeshByCellSet 1 2 3
 #runApplication mapFields ../throttle -sourceTime latestTime
 
 runApplication decomposePar
-runParallel $application
+runParallel $(getApplication)
 runApplication reconstructPar
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/cavitatingFoam/RAS/throttle/Allrun b/tutorials/multiphase/cavitatingFoam/RAS/throttle/Allrun
index 746320a279e..d399430e224 100755
--- a/tutorials/multiphase/cavitatingFoam/RAS/throttle/Allrun
+++ b/tutorials/multiphase/cavitatingFoam/RAS/throttle/Allrun
@@ -4,8 +4,6 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
-application=$(getApplication)
-
 refineMeshByCellSet()
 {
    while [ $# -ge 1 ]
@@ -26,6 +24,6 @@ refineMeshByCellSet()
 
 runApplication blockMesh
 refineMeshByCellSet 1 2 3
-runApplication $application
+runApplication $(getApplication)
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/compressibleInterDyMFoam/RAS/sloshingTank2D/Allrun b/tutorials/multiphase/compressibleInterDyMFoam/RAS/sloshingTank2D/Allrun
index 603304a5ae3..31527e6ec22 100755
--- a/tutorials/multiphase/compressibleInterDyMFoam/RAS/sloshingTank2D/Allrun
+++ b/tutorials/multiphase/compressibleInterDyMFoam/RAS/sloshingTank2D/Allrun
@@ -8,6 +8,6 @@ m4 system/blockMeshDict.m4 > system/blockMeshDict
 runApplication blockMesh
 cp 0/alpha.water.orig 0/alpha.water
 runApplication setFields
-runApplication `getApplication`
+runApplication $(getApplication)
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/compressibleMultiphaseInterFoam/laminar/damBreak4phase/Allrun b/tutorials/multiphase/compressibleMultiphaseInterFoam/laminar/damBreak4phase/Allrun
index 912c34cfdb7..6cfec647c79 100755
--- a/tutorials/multiphase/compressibleMultiphaseInterFoam/laminar/damBreak4phase/Allrun
+++ b/tutorials/multiphase/compressibleMultiphaseInterFoam/laminar/damBreak4phase/Allrun
@@ -4,13 +4,10 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
-# Set application name
-application=$(getApplication)
-
 restore0Dir
 
 runApplication blockMesh
 runApplication setFields
-runApplication $application
+runApplication $(getApplication)
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/driftFluxFoam/RAS/mixerVessel2D/Allrun b/tutorials/multiphase/driftFluxFoam/RAS/mixerVessel2D/Allrun
index f5e6c61a9e0..f1273de8e41 100755
--- a/tutorials/multiphase/driftFluxFoam/RAS/mixerVessel2D/Allrun
+++ b/tutorials/multiphase/driftFluxFoam/RAS/mixerVessel2D/Allrun
@@ -4,9 +4,7 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
-application=$(getApplication)
-
 runApplication ./makeMesh
-runApplication $application
+runApplication $(getApplication)
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/driftFluxFoam/RAS/tank3D/Allrun b/tutorials/multiphase/driftFluxFoam/RAS/tank3D/Allrun
index 89647850f52..c96f61d7ef3 100755
--- a/tutorials/multiphase/driftFluxFoam/RAS/tank3D/Allrun
+++ b/tutorials/multiphase/driftFluxFoam/RAS/tank3D/Allrun
@@ -4,8 +4,6 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
-application=$(getApplication)
-
-runApplication $application
+runApplication $(getApplication)
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interCondensingEvaporatingFoam/condensatingVessel/Allrun b/tutorials/multiphase/interCondensingEvaporatingFoam/condensatingVessel/Allrun
index ebc19b3d2a4..8a77ff80763 100755
--- a/tutorials/multiphase/interCondensingEvaporatingFoam/condensatingVessel/Allrun
+++ b/tutorials/multiphase/interCondensingEvaporatingFoam/condensatingVessel/Allrun
@@ -4,9 +4,7 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
-application=$(getApplication)
-
 runApplication blockMesh
-runApplication $application
+runApplication $(getApplication)
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interDyMFoam/RAS/floatingObject/Allrun b/tutorials/multiphase/interDyMFoam/RAS/floatingObject/Allrun
index 87531914666..6a9d0d02293 100755
--- a/tutorials/multiphase/interDyMFoam/RAS/floatingObject/Allrun
+++ b/tutorials/multiphase/interDyMFoam/RAS/floatingObject/Allrun
@@ -4,14 +4,11 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
-# Set application name
-application=$(getApplication)
-
 runApplication blockMesh
 runApplication topoSet
 runApplication subsetMesh -overwrite c0 -patch floatingObject
 restore0Dir
 runApplication setFields
-runApplication $application
+runApplication $(getApplication)
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interDyMFoam/RAS/mixerVesselAMI/Allrun b/tutorials/multiphase/interDyMFoam/RAS/mixerVesselAMI/Allrun
index f35012c3e07..83e66bcf9ca 100755
--- a/tutorials/multiphase/interDyMFoam/RAS/mixerVesselAMI/Allrun
+++ b/tutorials/multiphase/interDyMFoam/RAS/mixerVesselAMI/Allrun
@@ -4,18 +4,10 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
-application=$(getApplication)
-
-
 ./Allrun.pre
 
-# Decompose
 runApplication decomposePar -force
-
-# Run
-runParallel $application
-
-# Reconstruct
+runParallel $(getApplication)
 runApplication reconstructPar -noFunctionObjects
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interDyMFoam/RAS/mixerVesselAMI/Allrun.pre b/tutorials/multiphase/interDyMFoam/RAS/mixerVesselAMI/Allrun.pre
index 1f8a3f5f9fb..0d993b2ee7d 100755
--- a/tutorials/multiphase/interDyMFoam/RAS/mixerVesselAMI/Allrun.pre
+++ b/tutorials/multiphase/interDyMFoam/RAS/mixerVesselAMI/Allrun.pre
@@ -4,9 +4,6 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
-# Set application name
-application=$(getApplication)
-
 \rm -rf 0
 
 # Meshing
diff --git a/tutorials/multiphase/interDyMFoam/RAS/motorBike/Allclean b/tutorials/multiphase/interDyMFoam/RAS/motorBike/Allclean
index 29141d9f9ba..5442dc1333e 100755
--- a/tutorials/multiphase/interDyMFoam/RAS/motorBike/Allclean
+++ b/tutorials/multiphase/interDyMFoam/RAS/motorBike/Allclean
@@ -1,5 +1,5 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1    # Run from this directory
 
 # Source tutorial clean functions
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
diff --git a/tutorials/multiphase/interDyMFoam/RAS/motorBike/Allrun b/tutorials/multiphase/interDyMFoam/RAS/motorBike/Allrun
index 8c8ea78f795..d22cdd2cc46 100755
--- a/tutorials/multiphase/interDyMFoam/RAS/motorBike/Allrun
+++ b/tutorials/multiphase/interDyMFoam/RAS/motorBike/Allrun
@@ -16,5 +16,4 @@ runParallel -s reconstruct redistributePar -reconstruct
 runParallel -s decompose redistributePar -decompose -latestTime
 runParallel -s restart $(getApplication)
 
-
 # -----------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interDyMFoam/RAS/motorBike/Allrun.pre b/tutorials/multiphase/interDyMFoam/RAS/motorBike/Allrun.pre
index 5b7c3d7bc25..d4a3ff96399 100755
--- a/tutorials/multiphase/interDyMFoam/RAS/motorBike/Allrun.pre
+++ b/tutorials/multiphase/interDyMFoam/RAS/motorBike/Allrun.pre
@@ -29,3 +29,5 @@ runParallel snappyHexMesh -overwrite
 restore0Dir -processor
 
 runParallel setFields
+
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interDyMFoam/laminar/sloshingTank2D/Allrun b/tutorials/multiphase/interDyMFoam/laminar/sloshingTank2D/Allrun
index 603304a5ae3..e827b4c66ab 100755
--- a/tutorials/multiphase/interDyMFoam/laminar/sloshingTank2D/Allrun
+++ b/tutorials/multiphase/interDyMFoam/laminar/sloshingTank2D/Allrun
@@ -7,7 +7,8 @@ cd ${0%/*} || exit 1    # Run from this directory
 m4 system/blockMeshDict.m4 > system/blockMeshDict
 runApplication blockMesh
 cp 0/alpha.water.orig 0/alpha.water
+
 runApplication setFields
-runApplication `getApplication`
+runApplication $(getApplication)
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interDyMFoam/laminar/sloshingTank2D3DoF/Allrun b/tutorials/multiphase/interDyMFoam/laminar/sloshingTank2D3DoF/Allrun
index 603304a5ae3..e827b4c66ab 100755
--- a/tutorials/multiphase/interDyMFoam/laminar/sloshingTank2D3DoF/Allrun
+++ b/tutorials/multiphase/interDyMFoam/laminar/sloshingTank2D3DoF/Allrun
@@ -7,7 +7,8 @@ cd ${0%/*} || exit 1    # Run from this directory
 m4 system/blockMeshDict.m4 > system/blockMeshDict
 runApplication blockMesh
 cp 0/alpha.water.orig 0/alpha.water
+
 runApplication setFields
-runApplication `getApplication`
+runApplication $(getApplication)
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interDyMFoam/laminar/sloshingTank3D/Allrun b/tutorials/multiphase/interDyMFoam/laminar/sloshingTank3D/Allrun
index 603304a5ae3..e827b4c66ab 100755
--- a/tutorials/multiphase/interDyMFoam/laminar/sloshingTank3D/Allrun
+++ b/tutorials/multiphase/interDyMFoam/laminar/sloshingTank3D/Allrun
@@ -7,7 +7,8 @@ cd ${0%/*} || exit 1    # Run from this directory
 m4 system/blockMeshDict.m4 > system/blockMeshDict
 runApplication blockMesh
 cp 0/alpha.water.orig 0/alpha.water
+
 runApplication setFields
-runApplication `getApplication`
+runApplication $(getApplication)
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interDyMFoam/laminar/sloshingTank3D3DoF/Allrun b/tutorials/multiphase/interDyMFoam/laminar/sloshingTank3D3DoF/Allrun
index 603304a5ae3..823b296e60d 100755
--- a/tutorials/multiphase/interDyMFoam/laminar/sloshingTank3D3DoF/Allrun
+++ b/tutorials/multiphase/interDyMFoam/laminar/sloshingTank3D3DoF/Allrun
@@ -6,8 +6,9 @@ cd ${0%/*} || exit 1    # Run from this directory
 
 m4 system/blockMeshDict.m4 > system/blockMeshDict
 runApplication blockMesh
+
 cp 0/alpha.water.orig 0/alpha.water
 runApplication setFields
-runApplication `getApplication`
+runApplication $(getApplication)
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interDyMFoam/laminar/sloshingTank3D6DoF/Allrun b/tutorials/multiphase/interDyMFoam/laminar/sloshingTank3D6DoF/Allrun
index c1f08e0d5a1..1f23b71a3d6 100755
--- a/tutorials/multiphase/interDyMFoam/laminar/sloshingTank3D6DoF/Allrun
+++ b/tutorials/multiphase/interDyMFoam/laminar/sloshingTank3D6DoF/Allrun
@@ -7,6 +7,7 @@ cd ${0%/*} || exit 1    # Run from this directory
 m4 system/blockMeshDict.m4 > system/blockMeshDict
 runApplication blockMesh
 \cp 0/alpha.water.orig 0/alpha.water
+
 runApplication setFields
 runApplication $(getApplication)
 
diff --git a/tutorials/multiphase/interDyMFoam/laminar/testTubeMixer/Allrun b/tutorials/multiphase/interDyMFoam/laminar/testTubeMixer/Allrun
index 9d4261f19ac..0af06e79fb4 100755
--- a/tutorials/multiphase/interDyMFoam/laminar/testTubeMixer/Allrun
+++ b/tutorials/multiphase/interDyMFoam/laminar/testTubeMixer/Allrun
@@ -6,7 +6,8 @@ cd ${0%/*} || exit 1    # Run from this directory
 
 runApplication blockMesh
 cp 0/alpha.water.orig 0/alpha.water
+
 runApplication setFields
-runApplication `getApplication`
+runApplication $(getApplication)
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interFoam/LES/nozzleFlow2D/Allrun b/tutorials/multiphase/interFoam/LES/nozzleFlow2D/Allrun
index f56f378d9f0..f110e3491b5 100755
--- a/tutorials/multiphase/interFoam/LES/nozzleFlow2D/Allrun
+++ b/tutorials/multiphase/interFoam/LES/nozzleFlow2D/Allrun
@@ -4,9 +4,6 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
-# Get application name
-application=$(getApplication)
-
 runApplication blockMesh
 
 for i in 1 2
@@ -18,6 +15,6 @@ do
         refineMesh -dict system/refineMeshDict -overwrite
 done
 
-runApplication $application
+runApplication $(getApplication)
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interFoam/RAS/angledDuct/Allrun b/tutorials/multiphase/interFoam/RAS/angledDuct/Allrun
index 4f55fd7efaf..ccdfefe5c1c 100755
--- a/tutorials/multiphase/interFoam/RAS/angledDuct/Allrun
+++ b/tutorials/multiphase/interFoam/RAS/angledDuct/Allrun
@@ -1,10 +1,12 @@
 #!/bin/sh
 cd ${0%/*} || exit 1    # Run from this directory
 
-m4 system/blockMeshDict.m4 > system/blockMeshDict
-
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
+m4 system/blockMeshDict.m4 > system/blockMeshDict
+
 runApplication blockMesh
 runApplication $(getApplication)
+
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interFoam/RAS/damBreak/damBreak/Allrun b/tutorials/multiphase/interFoam/RAS/damBreak/damBreak/Allrun
index b18d70e448c..ed61ac54353 100755
--- a/tutorials/multiphase/interFoam/RAS/damBreak/damBreak/Allrun
+++ b/tutorials/multiphase/interFoam/RAS/damBreak/damBreak/Allrun
@@ -4,11 +4,8 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
-# Get application name
-application=$(getApplication)
-
 runApplication blockMesh
 runApplication setFields
-runApplication $application
+runApplication $(getApplication)
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interFoam/RAS/damBreakPorousBaffle/Allrun b/tutorials/multiphase/interFoam/RAS/damBreakPorousBaffle/Allrun
index cdc9763e1b2..4c6866acbc1 100755
--- a/tutorials/multiphase/interFoam/RAS/damBreakPorousBaffle/Allrun
+++ b/tutorials/multiphase/interFoam/RAS/damBreakPorousBaffle/Allrun
@@ -4,14 +4,11 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
-# Get application name
-application=$(getApplication)
-
 runApplication blockMesh
 runApplication setFields
 
 runApplication createBaffles -overwrite
 
-runApplication $application
+runApplication $(getApplication)
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interFoam/RAS/waterChannel/Allmesh b/tutorials/multiphase/interFoam/RAS/waterChannel/Allmesh
index c941916ef13..f476661eb3f 100755
--- a/tutorials/multiphase/interFoam/RAS/waterChannel/Allmesh
+++ b/tutorials/multiphase/interFoam/RAS/waterChannel/Allmesh
@@ -1,5 +1,5 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1    # Run from this directory
 
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
diff --git a/tutorials/multiphase/interFoam/RAS/waterChannel/Allrun b/tutorials/multiphase/interFoam/RAS/waterChannel/Allrun
index e799b7914b2..5a86d49dcb6 100755
--- a/tutorials/multiphase/interFoam/RAS/waterChannel/Allrun
+++ b/tutorials/multiphase/interFoam/RAS/waterChannel/Allrun
@@ -4,13 +4,11 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
-application=$(getApplication)
-
 ./Allmesh
 
 cp 0/alpha.water.orig 0/alpha.water
 runApplication setFields
 
-runApplication $application
+runApplication $(getApplication)
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interFoam/RAS/weirOverflow/Allrun b/tutorials/multiphase/interFoam/RAS/weirOverflow/Allrun
index 54d0dfc6794..e0a3d741250 100755
--- a/tutorials/multiphase/interFoam/RAS/weirOverflow/Allrun
+++ b/tutorials/multiphase/interFoam/RAS/weirOverflow/Allrun
@@ -1,4 +1,5 @@
 #!/bin/sh
+cd ${0%/*} || exit 1    # Run from this directory
 
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
@@ -6,9 +7,9 @@
 restore0Dir
 
 runApplication blockMesh
-
 \cp 0/alpha.water.orig 0/alpha.water
 
 runApplication setFields
-
 runApplication $(getApplication)
+
+#------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interFoam/laminar/capillaryRise/Allrun b/tutorials/multiphase/interFoam/laminar/capillaryRise/Allrun
index 4c9e1c26d2a..b52e0c12fd0 100755
--- a/tutorials/multiphase/interFoam/laminar/capillaryRise/Allrun
+++ b/tutorials/multiphase/interFoam/laminar/capillaryRise/Allrun
@@ -4,11 +4,10 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
-application=$(getApplication)
-
 runApplication blockMesh
 \cp 0/alpha.water.orig 0/alpha.water
+
 runApplication setFields
-runApplication $application
+runApplication $(getApplication)
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interFoam/laminar/damBreak/damBreak/Allrun b/tutorials/multiphase/interFoam/laminar/damBreak/damBreak/Allrun
index b18d70e448c..ed61ac54353 100755
--- a/tutorials/multiphase/interFoam/laminar/damBreak/damBreak/Allrun
+++ b/tutorials/multiphase/interFoam/laminar/damBreak/damBreak/Allrun
@@ -4,11 +4,8 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
-# Get application name
-application=$(getApplication)
-
 runApplication blockMesh
 runApplication setFields
-runApplication $application
+runApplication $(getApplication)
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/interFoam/laminar/mixerVessel2D/Allrun b/tutorials/multiphase/interFoam/laminar/mixerVessel2D/Allrun
index 40baf145beb..d347ad0a845 100755
--- a/tutorials/multiphase/interFoam/laminar/mixerVessel2D/Allrun
+++ b/tutorials/multiphase/interFoam/laminar/mixerVessel2D/Allrun
@@ -4,11 +4,9 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
-application=$(getApplication)
-
 runApplication ./makeMesh
 \cp 0/alpha.water.orig 0/alpha.water
 runApplication setFields
-runApplication $application
+runApplication $(getApplication)
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/Allrun b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/Allrun
index 912c34cfdb7..6cfec647c79 100755
--- a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/Allrun
+++ b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/Allrun
@@ -4,13 +4,10 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
-# Set application name
-application=$(getApplication)
-
 restore0Dir
 
 runApplication blockMesh
 runApplication setFields
-runApplication $application
+runApplication $(getApplication)
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phaseFine/Allrun b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phaseFine/Allrun
index a0ed70da03a..fb2c7cf7a73 100755
--- a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phaseFine/Allrun
+++ b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phaseFine/Allrun
@@ -4,15 +4,12 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
-# Set application name
-application=$(getApplication)
-
 restore0Dir
 
 runApplication blockMesh
 runApplication setFields
 runApplication decomposePar
-runParallel $application
+runParallel $(getApplication)
 runApplication reconstructPar
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/multiphaseEulerFoam/mixerVessel2D/Allrun b/tutorials/multiphase/multiphaseEulerFoam/mixerVessel2D/Allrun
index f5e6c61a9e0..f1273de8e41 100755
--- a/tutorials/multiphase/multiphaseEulerFoam/mixerVessel2D/Allrun
+++ b/tutorials/multiphase/multiphaseEulerFoam/mixerVessel2D/Allrun
@@ -4,9 +4,7 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
-application=$(getApplication)
-
 runApplication ./makeMesh
-runApplication $application
+runApplication $(getApplication)
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/multiphaseInterDyMFoam/laminar/mixerVesselAMI2D/Allrun b/tutorials/multiphase/multiphaseInterDyMFoam/laminar/mixerVesselAMI2D/Allrun
index f8ec2f0689d..cf76c5c4a6c 100755
--- a/tutorials/multiphase/multiphaseInterDyMFoam/laminar/mixerVesselAMI2D/Allrun
+++ b/tutorials/multiphase/multiphaseInterDyMFoam/laminar/mixerVesselAMI2D/Allrun
@@ -4,16 +4,15 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
-application=$(getApplication)
-
 ./makeMesh
 
 restore0Dir
 runApplication setFields
 
-#runApplication $application
+#runApplication $(getApplication)
+
 #runApplication decomposePar
-#runParallel $application
+#runParallel $(getApplication)
 #runApplication reconstructPar
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phase/Allrun b/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phase/Allrun
index 912c34cfdb7..6cfec647c79 100755
--- a/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phase/Allrun
+++ b/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phase/Allrun
@@ -4,13 +4,10 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
-# Set application name
-application=$(getApplication)
-
 restore0Dir
 
 runApplication blockMesh
 runApplication setFields
-runApplication $application
+runApplication $(getApplication)
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phaseFine/Allrun b/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phaseFine/Allrun
index a0ed70da03a..fb2c7cf7a73 100755
--- a/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phaseFine/Allrun
+++ b/tutorials/multiphase/multiphaseInterFoam/laminar/damBreak4phaseFine/Allrun
@@ -4,15 +4,12 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
-# Set application name
-application=$(getApplication)
-
 restore0Dir
 
 runApplication blockMesh
 runApplication setFields
 runApplication decomposePar
-runParallel $application
+runParallel $(getApplication)
 runApplication reconstructPar
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/multiphaseInterFoam/laminar/mixerVessel2D/Allrun b/tutorials/multiphase/multiphaseInterFoam/laminar/mixerVessel2D/Allrun
index f5e6c61a9e0..f1273de8e41 100755
--- a/tutorials/multiphase/multiphaseInterFoam/laminar/mixerVessel2D/Allrun
+++ b/tutorials/multiphase/multiphaseInterFoam/laminar/mixerVessel2D/Allrun
@@ -4,9 +4,7 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
-application=$(getApplication)
-
 runApplication ./makeMesh
-runApplication $application
+runApplication $(getApplication)
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/potentialFreeSurfaceDyMFoam/oscillatingBox/Allrun b/tutorials/multiphase/potentialFreeSurfaceDyMFoam/oscillatingBox/Allrun
index c2b53fdc45a..7cdbc56f458 100755
--- a/tutorials/multiphase/potentialFreeSurfaceDyMFoam/oscillatingBox/Allrun
+++ b/tutorials/multiphase/potentialFreeSurfaceDyMFoam/oscillatingBox/Allrun
@@ -4,12 +4,9 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
-# Set application name
-application=$(getApplication)
-
 runApplication blockMesh
 
-runApplication -s 1  topoSet
+runApplication -s 1 topoSet
 
 runApplication subsetMesh -overwrite c0 -patch floatingObject
 
@@ -20,6 +17,6 @@ runApplication createPatch -overwrite
 
 restore0Dir
 
-runApplication $application
+runApplication $(getApplication)
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/Allrun b/tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/Allrun
index 7f340efedbb..03b5ca39482 100755
--- a/tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/Allrun
+++ b/tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/Allrun
@@ -4,15 +4,12 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
-# Set application name
-application=$(getApplication)
-
 runApplication blockMesh
 runApplication topoSet
 runApplication subsetMesh -overwrite c0 -patch floatingObject
 
 restore0Dir
 
-runApplication $application
+runApplication $(getApplication)
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/Allrun b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/Allrun
index f5e6c61a9e0..f1273de8e41 100755
--- a/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/Allrun
+++ b/tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/mixerVessel2D/Allrun
@@ -4,9 +4,7 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
-application=$(getApplication)
-
 runApplication ./makeMesh
-runApplication $application
+runApplication $(getApplication)
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling/Allrun b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling/Allrun
index 11dd28b4388..c056332036a 100755
--- a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling/Allrun
+++ b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoiling/Allrun
@@ -4,16 +4,14 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
-application=`getApplication`
-
 runApplication blockMesh
-runApplication $application
+runApplication $(getApplication)
 
 if ! isTest $@
 then
     foamDictionary system/controlDict -entry endTime -set 5
     foamDictionary 2/T.liquid -entry boundaryField.wall2.q -set 1e5
-    runApplication -a $application
+    runApplication -a $(getApplication)
 fi
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingIATE/Allrun b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingIATE/Allrun
index 11dd28b4388..c056332036a 100755
--- a/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingIATE/Allrun
+++ b/tutorials/multiphase/reactingTwoPhaseEulerFoam/RAS/wallBoilingIATE/Allrun
@@ -4,16 +4,14 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
-application=`getApplication`
-
 runApplication blockMesh
-runApplication $application
+runApplication $(getApplication)
 
 if ! isTest $@
 then
     foamDictionary system/controlDict -entry endTime -set 5
     foamDictionary 2/T.liquid -entry boundaryField.wall2.q -set 1e5
-    runApplication -a $application
+    runApplication -a $(getApplication)
 fi
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/mixerVessel2D/Allrun b/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/mixerVessel2D/Allrun
index f5e6c61a9e0..f1273de8e41 100755
--- a/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/mixerVessel2D/Allrun
+++ b/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/mixerVessel2D/Allrun
@@ -4,9 +4,7 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
-application=$(getApplication)
-
 runApplication ./makeMesh
-runApplication $application
+runApplication $(getApplication)
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/Allrun b/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/Allrun
index 912c34cfdb7..6cfec647c79 100755
--- a/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/Allrun
+++ b/tutorials/multiphase/twoLiquidMixingFoam/lockExchange/Allrun
@@ -4,13 +4,10 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
-# Set application name
-application=$(getApplication)
-
 restore0Dir
 
 runApplication blockMesh
 runApplication setFields
-runApplication $application
+runApplication $(getApplication)
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/multiphase/twoPhaseEulerFoam/laminar/mixerVessel2D/Allrun b/tutorials/multiphase/twoPhaseEulerFoam/laminar/mixerVessel2D/Allrun
index f5e6c61a9e0..f1273de8e41 100755
--- a/tutorials/multiphase/twoPhaseEulerFoam/laminar/mixerVessel2D/Allrun
+++ b/tutorials/multiphase/twoPhaseEulerFoam/laminar/mixerVessel2D/Allrun
@@ -4,9 +4,7 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
-application=$(getApplication)
-
 runApplication ./makeMesh
-runApplication $application
+runApplication $(getApplication)
 
 #------------------------------------------------------------------------------
diff --git a/tutorials/preProcessing/createZeroDirectory/cavity/Allrun b/tutorials/preProcessing/createZeroDirectory/cavity/Allrun
index cdef18649d8..909a10a372f 100755
--- a/tutorials/preProcessing/createZeroDirectory/cavity/Allrun
+++ b/tutorials/preProcessing/createZeroDirectory/cavity/Allrun
@@ -1,9 +1,11 @@
 #!/bin/sh
+cd ${0%/*} || exit 1    # Run from this directory
+
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
 runApplication blockMesh
-
 runApplication createZeroDirectory
-
 runApplication $(getApplication)
+
+#------------------------------------------------------------------------------
diff --git a/tutorials/preProcessing/createZeroDirectory/motorBike/Allrun b/tutorials/preProcessing/createZeroDirectory/motorBike/Allrun
index dbb00a2dbb2..bec223b5dee 100755
--- a/tutorials/preProcessing/createZeroDirectory/motorBike/Allrun
+++ b/tutorials/preProcessing/createZeroDirectory/motorBike/Allrun
@@ -1,5 +1,5 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1    # Run from this directory
 
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
diff --git a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/Allclean b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/Allclean
index 18b6490f109..c0d30ba4bfd 100755
--- a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/Allclean
+++ b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/Allclean
@@ -1,5 +1,5 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1    # Run from this directory
 
 # Source tutorial clean functions
 . $WM_PROJECT_DIR/bin/tools/CleanFunctions
diff --git a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/Allrun b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/Allrun
index fded3a87586..cd9d35d580f 100755
--- a/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/Allrun
+++ b/tutorials/preProcessing/createZeroDirectory/snappyMultiRegionHeater/Allrun
@@ -1,5 +1,5 @@
 #!/bin/sh
-cd ${0%/*} || exit 1    # run from this directory
+cd ${0%/*} || exit 1    # Run from this directory
 
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
diff --git a/tutorials/stressAnalysis/solidDisplacementFoam/plateHole/Allrun b/tutorials/stressAnalysis/solidDisplacementFoam/plateHole/Allrun
index c64db75b8e6..9c5c0bb36ee 100755
--- a/tutorials/stressAnalysis/solidDisplacementFoam/plateHole/Allrun
+++ b/tutorials/stressAnalysis/solidDisplacementFoam/plateHole/Allrun
@@ -4,10 +4,8 @@ cd ${0%/*} || exit 1    # Run from this directory
 # Source tutorial run functions
 . $WM_PROJECT_DIR/bin/tools/RunFunctions
 
-application=`getApplication`
-
 runApplication blockMesh
-runApplication $application
+runApplication $(getApplication)
 runApplication -s sigma        postProcess -func "components(sigma)"
 runApplication -s singleGraph  postProcess -func singleGraph
 
-- 
GitLab