Skip to content

Instantly share code, notes, and snippets.

@pogin503
Created March 27, 2018 08:32
Show Gist options
  • Save pogin503/1368a7c30d9fa4a518e0bd30ffb1d237 to your computer and use it in GitHub Desktop.
Save pogin503/1368a7c30d9fa4a518e0bd30ffb1d237 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
TABLES="table1 table2 table3"
str=$(IFS=' '; for x in $TABLES; do printf " -t %s" "$x"; done)
echo "$str"
#=> -t table1 -t table2 -t table3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment