Sei sulla pagina 1di 1

#!

/bin/bash
inputDir=$1
echo `date '+%Y-%m-%d %T'`
#cat test1.txt | tail -n +3 | head -n -1 >> trimmed_file.xml
#cat test2.txt | tail -n +3 | head -n -1 >> trimmed2_file.xml
#cat test1.txt <(tail -n+3 test2.txt) > trimmed_file.xml
#head -n -1 test2.txt ; tail -n +2 test2.txt > > trimmed_file.xml
#cat test1.txt test2.txt >> trimmed_file.xml
sed -n -e '/<Worker_Sync>/,/<Worker_Sync\/>/ p' test1.txt | sed -e '1d;$d' >> me
rged_t_file.xml
sed -n -e '/<Worker_Sync>/,/<Worker_Sync\/>/ p' test2.txt | sed -e '1d;$d' >> me
rged_t_file.xml
cat merged_t_file.xml > buffer.xml
sed -n -e 'N;/<Worker_Sync>/ p' buffer.xml >> merged_t_file.xml
echo `date '+%Y-%mm-%dd %T'`
echo `date '+%Y-%m-%d %T'`
#cat test1.txt | tail -n +3 | head -n -1 >> trimmed_file.xml
#cat test2.txt | tail -n +3 | head -n -1 >> trimmed2_file.xml
#cat test1.txt <(tail -n+3 test2.txt) > trimmed_file.xml
#head -n -1 test2.txt ; tail -n +2 test2.txt > > trimmed_file.xml
#cat test1.txt test2.txt >> trimmed_file.xml
sed -n -e '/<Worker_Sync>/,/<Worker_Sync\/>/ p' test1.txt | sed -e '1d;$d' >> me
rged_t_file.xml
sed -n -e '/<Worker_Sync>/,/<Worker_Sync\/>/ p' test2.txt | sed -e '1d;$d' >> me
rged_t_file.xml
cat merged_t_file.xml > buffer.xml
sed -n -e 'N;/<Worker_Sync>/ p' buffer.xml >> merged_t_file.xml
echo `date '+%Y-%mm-%dd %T'`

Potrebbero piacerti anche