Skip to content

Instantly share code, notes, and snippets.

@ulyssesr
Last active July 14, 2018 19:08
Show Gist options
  • Save ulyssesr/676ee6a9b993653e3cc0030cafbe7d9d to your computer and use it in GitHub Desktop.
Save ulyssesr/676ee6a9b993653e3cc0030cafbe7d9d to your computer and use it in GitHub Desktop.
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