diff --git a/README.md b/README.md index 6c0f337..8b86d0e 100644 --- a/README.md +++ b/README.md @@ -229,7 +229,11 @@ file_data="$(<"file")" Alternative to the `cat` command. ```sh +# Bash <4 IFS=$'\n' read -d "" -ra file_data < "file" + +# Bash 4+ +mapfile -t file_data < "file" ``` ### Get the first N lines of a file.