01-21-2006
1,
0
Join Date: Jan 2006
Last Activity: 21 January 2006, 11:47 AM EST
Posts: 1
Thanks Given: 0
Thanked 0 Times in 0 Posts
I would like to know the explaination.
Hi, I'm new to LINUX Scripting, I would like to know the full explaination of the below scripts.
thank you.
1st script
#! /bin/sh
. /opt/home/hssadmin/cindy/formatxml.env
`testrecord.scp`
`testEXGU.scp`
2nd Script
#! /bin/sh
. /opt/home/hssadmin/cindy/formatxml.env
cd $base_directory
for file in `ls -1
3rd Script
#! /bin/sh
. /opt/home/hssadmin/cindy/formatxml.env
cd $base_directory
for file in `ls -1 HssJMSoutLog.*`; do
`grep "<" $file > $file.rawxml.out`
echo '<XML>' > $file.ALL.tmp
sed -e 's/^.*\(<pregate .*\)$/\1/' -n -e '/<pregate/,/<\/pregate>/ p' $file.rawxml.out >> $file.ALL.tmp
sed -e 's/^.*\(<ARGC-ARGU .*\)$/\1/' -n -e '/<ARGC-ARGU/,/<\/ARGC-ARGU>/ p' $file.rawxml.out >> $file.ALL.tmp
sed -e 's/^.*\(<EXGC-EXGU .*\)$/\1/' -n -e '/<EXGC-EXGU/,/<\/EXGC-EXGU>/ p' $file.rawxml.out >> $file.ALL.tmp
sed -e 's/^.*\(<EXLC-EXLU .*\)$/\1/' -n -e '/<EXLC-EXLU/,/<\/EXLC-EXLU>/ p' $file.rawxml.out >> $file.ALL.tmp
sed -e 's/^.*\(<ARLC-ARLU .*\)$/\1/' -n -e '/<ARLC-ARLU/,/<\/ARLC-ARLU>/ p' $file.rawxml.out >> $file.ALL.tmp
sed -e 's/^.*\(<HVEH .*\)$/\1/' -n -e '/<HVEH/,/<\/HVEH>/ p' $file.rawxml.out >> $file.ALL.tmp
sed -e 's/^.*\(<SDEN .*\)$/\1/' -n -e '/<SDEN/,/<\/SDEN>/ p' $file.rawxml.out >> $file.ALL.tmp
echo '</XML>' >> $file.ALL.tmp
sed -e 's/pregate/record/g' -e 's/ARGC-ARGU/record/g' -e 's/EXGC-EXGU/record/g' -e 's/EXLC-EXLU/record/g' -e 's/ARLC-ARLU/record/g' -e 's/HVEH/record/g' -e 's/SDEN/record/g' $file.ALL.tmp> $file.tmp.xml
mv $file.tmp.xml $output
rm $file.rawxml.out
rm $file.ALL.tmp
mv $file $process_folder
done