From dc1008b705c948e068ee909c12db1c583b3c1e62 Mon Sep 17 00:00:00 2001 From: Henry Date: Fri, 13 Mar 2015 17:55:27 +0000 Subject: [PATCH] Replace xargs -i with xargs -I as the -i option is deprecated --- bin/foamPackMake | 2 +- bin/touchdep | 4 ++-- bin/toucho | 4 ++-- .../pisoFoam/les/motorBike/lesFiles/Allrun | 12 ++++++------ .../pisoFoam/les/motorBike/motorBike/Allrun | 2 +- tutorials/incompressible/simpleFoam/motorBike/Allrun | 4 ++-- .../incompressible/simpleFoam/turbineSiting/Allrun | 2 +- wmake/wcleanAll | 2 +- wmake/wcleanMachine | 2 +- 9 files changed, 17 insertions(+), 17 deletions(-) diff --git a/bin/foamPackMake b/bin/foamPackMake index 0d58a9a2..527d2764 100755 --- a/bin/foamPackMake +++ b/bin/foamPackMake @@ -150,7 +150,7 @@ esac trap 'rm -f $packFile 2>/dev/null' INT find -H $packDir -depth -name Make -type d -print | \ - xargs -i find '{}' -depth -name "$archOptions*" -type d -print | \ + xargs -I find '{}' -depth -name "$archOptions*" -type d -print | \ tar $tarOpt $packFile -T - if [ $? -eq 0 ] diff --git a/bin/touchdep b/bin/touchdep index 64bc3846..ef9b55b4 100755 --- a/bin/touchdep +++ b/bin/touchdep @@ -87,8 +87,8 @@ do then echo "touching all .dep files under Make/$WM_OPTIONS* : $i" find $i -depth -name Make -type d -print | \ - xargs -i find '{}' -depth -name "$WM_OPTIONS*" -type d -print | \ - xargs -i find '{}' -name '*.dep' -type f -print | \ + xargs -I find '{}' -depth -name "$WM_OPTIONS*" -type d -print | \ + xargs -I find '{}' -name '*.dep' -type f -print | \ xargs -t touch else echo "touching all .dep files: $i" diff --git a/bin/toucho b/bin/toucho index 9188d3b9..051862b0 100755 --- a/bin/toucho +++ b/bin/toucho @@ -83,8 +83,8 @@ do then echo "touching all .o files under Make/$WM_OPTIONS* : $i" find $i -depth -name Make -type d -print | \ - xargs -i find '{}' -depth -name "$WM_OPTIONS*" -type d -print | \ - xargs -i find '{}' -name '*.o' -type f -print | \ + xargs -I find '{}' -depth -name "$WM_OPTIONS*" -type d -print | \ + xargs -I find '{}' -name '*.o' -type f -print | \ xargs -t touch else echo "touching all .o files: $i" diff --git a/tutorials/incompressible/pisoFoam/les/motorBike/lesFiles/Allrun b/tutorials/incompressible/pisoFoam/les/motorBike/lesFiles/Allrun index 4cbfb18b..382fa3d5 100755 --- a/tutorials/incompressible/pisoFoam/les/motorBike/lesFiles/Allrun +++ b/tutorials/incompressible/pisoFoam/les/motorBike/lesFiles/Allrun @@ -8,13 +8,13 @@ cp ../lesFiles/fvS* ../lesFiles/controlDict system/ cp ../lesFiles/LESProperties ../lesFiles/turbulenceProperties constant/ -ls -d processor* | xargs -i rm -rf ./{}/0 $1 -ls -d processor* | xargs -i mv ./{}/500 ./{}/0 $1 -ls -d processor* | xargs -i rm -rf ./{}/0/uniform $1 +ls -d processor* | xargs -I rm -rf ./{}/0 $1 +ls -d processor* | xargs -I mv ./{}/500 ./{}/0 $1 +ls -d processor* | xargs -I rm -rf ./{}/0/uniform $1 -ls -d processor* | xargs -i cp ../lesFiles/LESProperties ./{}/constant/ $1 -ls -d processor* | xargs -i cp ../lesFiles/turbulenceProperties ./{}/constant/ $1 -ls -d processor* | xargs -i cp ../lesFiles/nuSgs ./{}/0/ $1 +ls -d processor* | xargs -I cp ../lesFiles/LESProperties ./{}/constant/ $1 +ls -d processor* | xargs -I cp ../lesFiles/turbulenceProperties ./{}/constant/ $1 +ls -d processor* | xargs -I cp ../lesFiles/nuSgs ./{}/0/ $1 runParallel pisoFoam 8 diff --git a/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/Allrun b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/Allrun index a38fa1ed..381f9c90 100755 --- a/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/Allrun +++ b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/Allrun @@ -19,7 +19,7 @@ runParallel snappyHexMesh 8 -overwrite -parallel find . -type f -iname "*level*" -exec rm {} \; -ls -d processor* | xargs -i cp -r 0.org ./{}/0 $1 +ls -d processor* | xargs -I cp -r 0.org ./{}/0 $1 runParallel renumberMesh 8 -overwrite diff --git a/tutorials/incompressible/simpleFoam/motorBike/Allrun b/tutorials/incompressible/simpleFoam/motorBike/Allrun index b72319ff..db60fbf4 100755 --- a/tutorials/incompressible/simpleFoam/motorBike/Allrun +++ b/tutorials/incompressible/simpleFoam/motorBike/Allrun @@ -17,8 +17,8 @@ runParallel snappyHexMesh 6 -overwrite #cp -r 0.org 0 > /dev/null 2>&1 #- For parallel running -ls -d processor* | xargs -i rm -rf ./{}/0 -ls -d processor* | xargs -i cp -r 0.org ./{}/0 +ls -d processor* | xargs -I rm -rf ./{}/0 +ls -d processor* | xargs -I cp -r 0.org ./{}/0 runParallel patchSummary 6 runParallel potentialFoam 6 -noFunctionObjects diff --git a/tutorials/incompressible/simpleFoam/turbineSiting/Allrun b/tutorials/incompressible/simpleFoam/turbineSiting/Allrun index d08deac0..4b407535 100755 --- a/tutorials/incompressible/simpleFoam/turbineSiting/Allrun +++ b/tutorials/incompressible/simpleFoam/turbineSiting/Allrun @@ -16,7 +16,7 @@ runParallel snappyHexMesh 4 -overwrite find . -type f -iname "*level*" -exec rm {} \; -ls -d processor* | xargs -i cp -r 0.org ./{}/0 $1 +ls -d processor* | xargs -I cp -r 0.org ./{}/0 $1 runParallel topoSet 4 runParallel `getApplication` 4 diff --git a/wmake/wcleanAll b/wmake/wcleanAll index 499b95eb..389e09e2 100755 --- a/wmake/wcleanAll +++ b/wmake/wcleanAll @@ -66,7 +66,7 @@ find . -name '*.dep' -exec rm {} \; echo "Cleaning Make subdirectories" find . -depth \( -name Make -o -name "Make.[A-Za-z]*" \) -type d -print | \ - xargs -i find '{}' -mindepth 1 -maxdepth 1 -type d -print | \ + xargs -I find '{}' -mindepth 1 -maxdepth 1 -type d -print | \ xargs rm -rf echo "Removing lnInclude and intermediate directories" diff --git a/wmake/wcleanMachine b/wmake/wcleanMachine index 7981a55c..b668dfe5 100755 --- a/wmake/wcleanMachine +++ b/wmake/wcleanMachine @@ -77,7 +77,7 @@ do echo "Cleaning machine type: $machType" find . -depth \( -name Make -o -name "Make.[A-Za-z]*" \) -type d -print | \ - xargs -i find '{}' -mindepth 1 -maxdepth 1 \ + xargs -I find '{}' -mindepth 1 -maxdepth 1 \ \( -type d -name "*$machType" -o -name "*$machType$WM_MPLIB" \) \ -print | xargs rm -rf