11/15/2017
find . -type f | xargs sed -i "s/#{phone}/#{link_to phone, \"tel:#{phone_raw}\", class: 'active-states-state__link'}g"
11/20/2017
fc
11/21/2017
ctrl-x ctrl-e
11/28/2017
I've got a dotfiles
folder living in the git
dir where I keep my dotfiles for git control purposes.
move the dotfile you want (I'll be referring to my i3 config file):
mv ~/.config/i3/config ~/git/dotfiles/config
symlink the dotfile so it can be loaded:
ln -s ~/git/dotfiles/config ~/.config/i3/config
I always forget the syntax: ln -s
followed by <where the file actually lives>
followed by <where I want to file to pretend to live>
1/12/2018
I want to test my sed string on a file, or many files before doing something wild.
sed -n "s/search-term/replacement/p" file-name
I also can do a count on occurances across a directory to compare after the change
ag -Q "search-term" | wc -l