for file in *.txt; do
    zip "${file%.*}.zip" "$file"
done
