hi friends,,,
I have two type of files one .txt format another one is .idx format..
txt file have 7 columns delimited with "|"
idx file have 7 columns demilited with ","
i have to compare the txt file 2nd and 3rd column with idx 3rd and 4th column.
Here is my script :
if [ $# != 2 ]
then
echo "Usage: $0 <Comma Seperated File(.IDX)> <Pipe Seperated File (.TXT)>"
exit
fi
fname=`ls $1 |awk -F"/" '{print $NF}' |cut -d "." -f1`
mkdir .temp_as_$fname;
awk -F"," '{print $3 "|" $4 }' $1 |sort -u > .temp_as_$fname/IDX_File
awk -F"|" '{print $3 FS $4}' $2 |sort -u > .temp_as_$fname/TXT_File
comm -23 .temp_as_$fname/TXT_File .temp_as_$fname/IDX_File > .temp_as_$fname/IDX_Issue.txt
comm -13 .temp_as_$fname/TXT_File .temp_as_$fname/IDX_File > .temp_as_$fname/TXT_Issue.txt
Am having 250 number of idx and txt files.. so that i have to run both number of files and getting 250 output files.. so i want to get only one output file.. and 250 files should be stored in array..
how to do this... guide me..:?: