Bash Tips and Pitfalls: Difference between revisions

From miki
Jump to navigation Jump to search
No edit summary
m (Bash Tips moved to Bash Tips and Pitfalls: We'll also add common pitfalls to this page)

Revision as of 09:40, 19 January 2009

Empty a file named filename, keeping the same permission and user/group:

>filename

Print multi-lines text with echo:

$ echo -e "Some text\n...on 2 lines..."                    # Enable interpretation of backslash escapes (must be quoted!)
Some text
...on 2 lines...