bash - Echo text typed to a file -


usage example:

$ startmem > command1  > command2 > command3 > end $ vi mem.txt  mem.txt ------- command1 command2 command3 

so need bash program echo whats typed file, excluding 'end' statement.

just use cat here document.

$ cat <<eof > mem.txt command1 command2 command3 eof $ cat mem.txt command1 command2 command3 

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 -