#!/bin/sh cd "$( dirname "$( readlink -f "$0" )" )" || exit CONFIG_PATH="./config" . ./config/*.conf echo "$_FILE_TO_COPY" echo "$_DOTFILES" while VAR= read -r line; do order="$(echo $line | cut -d ' ' -f 1)" file_on_computer="$(echo $line | cut -d ' ' -f 2)" file_on_dotfile="$(echo $line | cut -d ' ' -f 3)" if [ "$order" = "d" ] then echo ".. d detected .." elif [ "$order" = "f" ] then echo ".. f detected .." else echo "Err, $order uknown" fi echo " .. $order $file_on_computer $file_on_dotfile.. "; done <<< "$_FILE_TO_COPY"