Bash alias to script generating shebang text -


how create alias short code snippet generates shebang (#!/bin/bash) text?

i'm looking like:

alias createconfiger='echo -e "#!/bin/bash\necho configvalue" > printconfig.sh'  

you need in 2 steps, , apparently use single-quotes well:

tempvar='#!/bin/bash\necho configvalue' alias createconfiger='echo -e "$tempvar" > printconfig.sh' 

Comments

Popular posts from this blog

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -

javascript - oscilloscope of speaker input stops rendering after a few seconds -