From b9a2591b4538a4788de48a285e963e2c522eaa12 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Wed, 13 Jun 2018 13:36:55 +1000 Subject: [PATCH] docs: update --- README.md | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2dd4d44..a65e601 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,7 @@ scripts and not full blown utilities. * [Get the first N lines of a file.](#get-the-first-n-lines-of-a-file) * [Get the last N lines of a file.](#get-the-last-n-lines-of-a-file) * [Get the number of lines in a file.](#get-the-number-of-lines-in-a-file) + * [Create an empty file.](#create-an-empty-file) * [Strings](#strings) * [Trim white-space from string.](#trim-white-space-from-string) * [Split a string on a delimiter.](#split-a-string-on-a-delimiter) @@ -114,6 +115,18 @@ lines() { } ``` +### Create an empty file. + +Alternative to `touch`. + +```sh +:> file + +# Longer alternatives: +echo -n > file +printf '' > file +``` + ## Strings @@ -304,5 +317,3 @@ date() { printf "%($1)T\\n" } ``` - -