Skip to content

Instantly share code, notes, and snippets.

@granolocks
Created January 16, 2014 22:10
Show Gist options
  • Select an option

  • Save granolocks/8464444 to your computer and use it in GitHub Desktop.

Select an option

Save granolocks/8464444 to your computer and use it in GitHub Desktop.
read DATA from end of bash script... :)
f_data(){
tail -n $(expr $(wc -l $BASH_SOURCE | cut -d " " -f 1) - $(grep -ne '#\sDATA' $BASH_SOURCE|cut -d ":" -f 1)) $BASH_SOURCE
}
f_data
# DATA
# test data 1
# test data 2
# test data 3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment