I know how to create my custom terminal commands and that would be really useful for me in compiling all my java classes in a folder. I also see that for doing this people usually creates a folder ~/bin and put files .sh with the lines they wish they run, but I could not understand it well, I create a compile.sh with some lines for example
-gcc file -o file -gcc file1 -o file1
but as I was reading I also need to add a line to a file called .bashrc that is hidden in my home folder and I don't know how to do that, is there any way easier of editing this file? After I do it, my custom command will be the name of the .sh file (compile)?