I want to replace old path variable to new one like this:
script_path=$(readlink -f "$0") #[/home/username/Desktop/script]
desktopfolder_old=/home/username/Desktop
desktopfolder_new=/home/username/NewOne
script_path_new=$(echo "$script_path" | sed -e "s/$desktopfolder_old/$desktopfolder_new/")
Because the bash script will be moved while it is running. But couldn't do it. What would it be like?