Skip to content

Instantly share code, notes, and snippets.

@yvan-sraka
Created June 5, 2019 16:58
Show Gist options
  • Save yvan-sraka/043239e2837c2227d26811a5803b5c52 to your computer and use it in GitHub Desktop.
Save yvan-sraka/043239e2837c2227d26811a5803b5c52 to your computer and use it in GitHub Desktop.
#! /usr/bin/env bash
old_path="$1"
new_path="../fixed/$(echo "$old_path" | iconv -f utf-8 -t ascii//translit)"
if [[ -d $old_path ]]; then
mkdir -p "$new_path"
elif [[ -f $old_path ]]; then
rsync -azP "$old_path" "$new_path"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment