Today I Learned

A CCSalesPro project TwitterFollow on Twitter

3 posts about #command-line

I learned how to use regex in cli.

I was want to copy a specific list of files ranging from name01furthername.ext to name39furthername.ext (of multiple extensions). I found https://askubuntu.com/questions/327282/copying-multiple-specific-files-from-one-folder-to-another : cp name{01..39}*.ext desireddestination/folder/. worked perfectly!

How to make an alias on mac cli.

I worked with Dillon and Ben yesterday and in the process I saw Dillon type da return and saw the direnv allow process. I thought that is cool, I need to do that. So today I did a quick look and found at https://macosx-faq.com/how-to-make-alias-with-terminal/ how you can create your own alias.

alias da='direnv allow'

How to escape single quotes in bash.

rake devdata:load_production snapshot_production_db_args='-statement-analyses-query="select id
from statement_analyses
where parser_id = '"'"'elavon'"'"';"'`

To be recognized as:

bin/snapshot_production_db -statement-analyses-query="select id from statement_analyses where parser_id = 'elavon';"

How to escape single quotes within single quoted strings