#!/bin/bash # Author : Ismael BarrosĀ² # License : BSD http://en.wikipedia.org/wiki/BSD_license for i in usr opt; do sed -i -e "s|././/|/${i}/|g" $@ sed -i -e "s|././$|/${i}|g" $@ done