Skip to content

Instantly share code, notes, and snippets.

@ulyssesr ulyssesr/readfile.sh
Last active Jul 14, 2018

Embed
What would you like to do?
Read from a file. Assign content of file to a variable.
#!/bin/bash
file="/data/buckets.txt"
count=$(cat "$file")
echo "There are $count buckets"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.