How is it possible to execute a shell script without creating a file? For example assume I have the following script (testscript
):
#!/bin/bash
function run_free() {
free -m
}
run_free
I then of course can execute this with: sh testscript
I want to ovoid creating a file though. I tried:
sh echo '#!/bin/bash
function run_free() {
free -m
}
run_free'
Which did not work. Any ideas?