Skip to content

TypeScript code snippet – How to put the contents of a file into an array in bash?

IFS=$'\n' read -d '' -r -a lines < /path/to/file
See also  How to take input in Python as string and convert into integer list?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.