mirror of
https://github.com/glest/glest-source.git
synced 2025-09-02 12:32:34 +02:00
- example script of splitting and comparing two large world log files
This commit is contained in:
49
mk/linux/analyzeWorldSynch.sh
Executable file
49
mk/linux/analyzeWorldSynch.sh
Executable file
@@ -0,0 +1,49 @@
|
||||
#!/bin/bash
|
||||
|
||||
MAX_SPLIT_SIZE_BYTES=75000000
|
||||
|
||||
echo 'Max split file size = $MAX_SPLIT_SIZE_BYTES'
|
||||
|
||||
echo 'Setting up temp folders...'
|
||||
|
||||
if [ -d temp ]; then
|
||||
echo 'Purging temp folders...'
|
||||
rm -r temp
|
||||
fi
|
||||
|
||||
if [ ! -d temp ]; then
|
||||
echo 'Creating temp folders...'
|
||||
mkdir temp
|
||||
fi
|
||||
|
||||
if [ ! -d temp ]; then
|
||||
echo 'Could not find temp folders, exiting...'
|
||||
exit
|
||||
fi
|
||||
|
||||
cd temp
|
||||
if [ ! -d temp1 ]; then
|
||||
echo 'Creating temp sub folders...'
|
||||
mkdir temp1
|
||||
fi
|
||||
|
||||
if [ -f xaa ] ; then
|
||||
rm x*
|
||||
fi
|
||||
|
||||
echo 'Copying logs to temp folders...'
|
||||
cp ../debugWorldSynch.log* .
|
||||
cp debugWorldSynch.log1 temp1/
|
||||
|
||||
echo 'Splitting logs in temp folders...'
|
||||
split -b $MAX_SPLIT_SIZE_BYTES debugWorldSynch.log
|
||||
|
||||
cd temp1
|
||||
if [ -f xaa ] ; then
|
||||
rm x*
|
||||
fi
|
||||
|
||||
split -b $MAX_SPLIT_SIZE_BYTES debugWorldSynch.log1
|
||||
cd ../
|
||||
|
||||
echo 'Please diff the files xaa (and other split files) in temp folders temp and temp1...'
|
Reference in New Issue
Block a user