I'm trying to merge the second field of the csv with all the id's in the diff file. codes.csv has 2 fields: ID,Description. I keep getting an error on the second cat
.
cat: codes.cvs: No such file or directory.
The file does exist and I'm running the script from the same directory as codes.csv.
for i in `cat diff.txt`;
do
for j in `cat codes.cvs`;
do
id = `sed "$j"`;
desc = `sed "?=$j"`;
if [$i == $id]
then
echo "$id $desc"
fi
done;
done;
Any ideas what I am doing wrong here?