#!/usr/bin/sh


# Replace the first line 

OLD_FIRST_LINE="/usr/local bin/julia"

# with this one

NEW_FIRST_LINE="/usr/bin/julia"

echo
echo "This will change the location of your preferred Julia from"
echo $OLD_FIRST_LINE
echo "to"
echo $NEW_FIRST_LINE
echo "for all files in the current directory."
echo $(pwd)


# Confirm

read -p "Are you sure? " -n 1 -r

echo  

if [[ $REPLY =~ ^[Yy]$ ]]
then

echo "Changing all files in the current directory ..."

cd src
sed -i "s|${OLD_FIRST_LINE}|$NEW_FIRST_LINE|" *


fi
exit
