I frequently use some commands, which I want to save in some file say
myregularshell.sh
these are the commands I use, I tried saving and executing, but couldn't get the preview of execution, and result is also not coming if I copy same commands and paste it on terminal result is coming
cd go somewhere
echo "I am here $PWD"
sudo su
source /etc/profile
sh operation.sh arguments
echo "Operation over"
find /mypath/path iname "*.abc" -delete
echo "old files deleted"
mv -i *.xyz /mypath/path
echo "new files moved "
Is there any way to save as shell script and execute ?