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

xslt - Substring before throwing error -

Google Cloud Bigtable Durability/Availability Guarantees -

Android M doze mode and "native" posix socket freezing up -