I want to know how to create a shell script inside a text editor.
So this is what I have inside the text editor.
#!/bin/bash mkdir -p temp cd temp if [ $1 > $2 ] ; then echo $1 else echo $2 fi ./max.sh 4 6 ./max.sh -2 -5 ./max.sh 7 -3
So basically inside the text editor I want to create a shell script called max.sh so that below it I can pass arguments through it but in the same text editor.
To make it more clear:
I want the if-statement to be inside a script called max.sh, so below it I can call the max.sh with arguments and it will work.
Hopefully this makes sense, sorry if it doesn't
Any help is appreciated.