#!/bin/bash for i in $(ls *.yaml) do name=$(echo $i | awk -F. '{print $1}') zip $name.zip $i done