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
Post a Comment