Recursively find and replace with bash by leveraging the grep
and sed
command.
grep -rlG <regexp pattern> <path> | xargs sed -i '' 's/pattern/replacement/g'
// ==UserScript== | |
// @name baidu yun 资源链接 | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description 自动将google搜索结果页面中百度云盘地址变成可点击的链接,如果链接附近有提取码,在点击时自动复制 | |
// @author You | |
// @match https://www.google.com/search* | |
// @grant none | |
// ==/UserScript== |
<video | |
id="video" | |
width="100%" | |
preload="auto" | |
x-webkit-airplay="true" | |
webkit-playsinline="true" | |
playsinline="true" | |
x5-video-player-type="h5" | |
x5-video-player-fullscreen="true" | |
src="https://video.c-ctrip.com/videos/u20j0z000000mjvtd0DB6.mp4" |
# with git: | |
git ls-files | wc -l | awk '{$1=$1;print $1 " total"}';git ls-files| sed 's/.*\.//' | sort | uniq -c | sort -r|awk '{$1=$1;print}' | |
# without git | |
find . -type f | wc -l | awk '{$1=$1;print $1 " total"}'; find . -type f | sed 's/.*\.//' | sort | uniq -c | sort -r|awk '{$1=$1;print}' |
# Set variables in .bashrc file | |
# don't forget to change your path correctly! | |
export GOPATH=$HOME/golang | |
export GOROOT=/usr/local/opt/go/libexec | |
export PATH=$PATH:$GOPATH/bin | |
export PATH=$PATH:$GOROOT/bin |
display: ; | |
visibility: ; | |
float: ; | |
clear: ; | |
position: ; | |
top: ; | |
right: ; | |
bottom: ; | |
left: ; |
// Place user-specific overrides in this file, to ensure they're preserved | |
// when upgrading | |
{ | |
"folder_exclude_patterns": [".svn", ".git", ".hg", "CVS", "node_modules"] | |
} |
{ | |
"bootstrapped": true, | |
"in_process_packages": | |
[ | |
], | |
"installed_packages": | |
[ | |
"CodeFormatter", | |
"DocBlockr", | |
"EJS", |