1.1.2 • Published 7 years ago
rsfs v1.1.2
test on
test on node >= 7.0.0
install
npm i rsfs -g
usage
fs -h
fs s -h
fs f -h
this tool, use node regexp
fs s /etc/ mysql
fs s /etc/ "mysql.\d+"
fs r /etc/ "(mysql)" "my\$1"
cat ./README.md | fs s "-im"
example
text : this is a wonderful test. wonderful
fs r ~/node/fs/test "(\w+)f(Ul)" "\$1-----\$2" -i
output : replaced with:this is a wonder-----ul test. wonder-----ul
search filename and text
fs s ~/node/fs Readme.md -if
-i ignore case
fs r ~/node/fs/test "-----" "f" -i
replace test
fs r ~/node/fs/ "require" "required" -t
-m not overwrite origin file . generate a new file with ext .hfs
fs r ~/node/fs/test "ds" "bird" -im
update list
1.1.2 if pattern is not right, throw error message.
1.1.0 add pipe search
1.0.8 filter big file.
1.0.6 fs-s add option -f , if you want to search filename