Truncate a file: Difference between revisions
Content added Content deleted
Line 658: | Line 658: | ||
---- |
---- |
||
Pure bourne-shell approach (cross-OS, no truncate(1) binary required) |
|||
<lang bash> |
|||
# 1. simplest one-liner |
# 1. simplest one-liner |
||
echo -n>file |
echo -n>file |
||
Line 730: | Line 730: | ||
abc+ echo _EOF_ |
abc+ echo _EOF_ |
||
_EOF_ |
_EOF_ |
||
# bonus: use a seek and append and add truncate(1) syntax w/ units - short one- |
# bonus: use a seek and append and add truncate(1) syntax w/ units - short one-liner |
||
</lang> |
|||
=={{header|ZX Spectrum Basic}}== |
=={{header|ZX Spectrum Basic}}== |