Making shapes with linux shell script -


for assignment, i'm trying make shell script print triangle looks following:

+ | \ |  \ |   \ |    \ +----- 

here code in vim:

echo'+      | \      |  \      |   \      |    \      +----- ' 

however, instead of getting output when run script, outputs following:

vi output issue

can tell me i'm doing wrong?

try this

#!/bin/bash echo '      +      | \      |  \      |   \      |    \      +----- ' 

just start on next line since need spaces before "+"


Comments

Popular posts from this blog

wordpress - (T_ENDFOREACH) php error -

Export Excel workseet into txt file using vba - (text and numbers with formulas) -

Using django-mptt to get only the categories that have items -