Brace Expansion
Never type your filepath twice again!
Have you ever been in the root of your rails app and wanted to copy your database_template.yml and name it database.yml? I have been doing:
cp config/database_template.yml config/database.yml
I disliked typing the path again! So new command:
cp config/{database_template,database}.yml
This will create a copy of the file and name it database
The command expands to:
echo config/{database_template,database}.yml
=> cp config/database_template.yml config/database.yml
Written by Jearvon Dharrie
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Shell
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#