How should we copy an executing script from one folder to the another?
The script content is:
#!/bin/sh
zenity --forms --title="Add Friend" \
--text="Enter information about your friend." \
--separator="," \
--add-entry="First Name" \
--add-entry="Family Name" \
--add-entry="Email" \
--add-calendar="Birthday" >> addr.csv
case $? in
0)
echo "Friend added.";;
1)
echo "No friend added."
;;
-1)
echo "An unexpected error has occurred."
;;
esac
Lets say i have saved the above script as test.sh
in home/user/Documents/sh/
and when I execute test.sh by double click it should copy itself to the meow
folder home/user/wow/meow/
.
cp /path/to/source /path/to/destination