stevenslxie / tutorials-for-web-developers Goto Github PK
View Code? Open in Web Editor NEWTutorials for web developers including bash scripting, Linux commands, MongoDB. Actively updating.
Tutorials for web developers including bash scripting, Linux commands, MongoDB. Actively updating.
在这个例子里,正则表达式^[ 1-3]的^表示字符串的开始,而中括号表示匹配任意一个在中括号里面的字符。我们的中括号里面有空格以及数字1-3,而之后*表示零到任意多个任意字符。于是,sed根据正则表达式的要求去逐行扫描,找出“以空格或者数字1-3开头的行”。
这段话里提到而之后*表示零到任意多个任意字符
, 但是往上看, 原表达式里是没有星号*
的, 请确认一下.
末尾的本文链接貌似错了, 可能需要更新一下, 否则打开就是404
...
比如如果一个行是以三个空格开头的,则加上*可以加之一并铲除,如果不加的话就只会匹配并删除第一个空格。两个合并命令之间以空格隔开。第二个命令是找出以分号句号或者感叹号结尾的行,代之以ENDING。
"两个合并命令之间以空格隔开"这里的空格
是不是应该改成分号
啊? 因为你的代码里写的分号.
其中pattern里面是一个正则表达式,表面了...
应该为表“明”了。
db.movie.find({$text:{$search:'Gump'}}).pretty()
,这一句应该是:查找标题为"Gump"的数据,而不是:查找带有"Gump"的标题。
在阅读'Shell编程极简入门实践.md'过程中发现了如下一些笔误:
正則表達式那裏的那句,只保留#!/usr/bash是不是應該是#!/bin/bash啊。。。
谢谢
declare -a NAMES=('Steven' 'Peter' 'David')
echo ${#NAMES[*]}
NAMES=("${NAMES[@]}" 'Nancy')
echo ${NAMES[0]}
能否教一下mapreduce 方面的例子?
3.数组
declare -a NAMES=('Steven' 'Peter' 'David')
bash限定
4.1 运算符还有let
,$((3+2*3))
额外的还有bc
4.2 逻辑运算
&&
,||
,在bash,zsh,ash等是可用的,也是常用的
for循环中,for var in "$arg"
只会把"$arg"
当作一个字符串,忽略里面的空白符(因为有双引号)。这是个陷阱。
一般用for var in $arg
sed命令,
注明:一般是sed 's/old/new/' file
这样用单引号而不是双引号,除非需要shell变量展开到sed命令中才用双引号。
-o对应或逻辑,-a对应与逻辑,应该是这样的吧,原文中的对应关系按照前后顺序('分别')来看是错误的,希望能修正下~
Shell编程里,与逻辑和或逻辑分别是用'-o'和'-a'来表示的
MongoDB极简实践入门.md:
line358:
类似的运算符还有:
$**let**
:小于或等于;$**get**
:大于或等于;$ne
:不等于。
应为let->lte,get->gte
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.