#!/bin/bash # Skip the config file name argument. shift args=() for arg in "$@"; do args+=(-e "$arg") done sed "${args[@]}"