我试图使用grep,就像我习惯使用Linux一样,具有所有令人惊叹的功能和RegEx的所有功能......但是在Mac OS X上它并没有像我期望的那样工作.
如果我使用"-P"(Perl Regex),它会给我"使用"( - help)输出.在那里我们在参数列表"-abcDEFGHhIiJLlmnOoPqRSsUVvwxZ"中找到"-P"参数......仍然无效.
另一个例子是星号或加号.我正在尝试这个http://wiki.bash-hackers.org/howto/conffile
检查配置文件中指令使用的不适当内容:
if egrep -q -v '^#|^[^ ]*=[^;]*' "$configfile"; then
echo "Config file is unclean, cleaning it..." >&2
# filter the original to a new file
egrep '^#|^[^ ]*=[^;&]*' "$configfile" > "$configfile_secured"
configfile="$configfile_secured"
fi
Run Code Online (Sandbox Code Playgroud)
它不适用于这样的行:
DATABASE=some_database; ls -la
Run Code Online (Sandbox Code Playgroud)
我究竟做错了什么?因为所有这些在Linux机器上运行正常.
我在这里使用git和应用补丁有点麻烦.
我正在尝试应用此补丁:https://www.drupal.org/node/2309321
到这个模块:https://www.drupal.org/node/2309089
我知道,这些都是Drupal链接,但这不是问题.您只需下载模块并将补丁放在同一个文件夹中即可.没有Drupal需要这个.
供参考:我命名了补丁eck_test.patch.
这是我到目前为止所尝试的:
git apply -v eck_test.patch
完全没有输出.
git apply -v --whitespace fix eck_test.patch
完全没有输出.
git am eck_test.patch
补丁格式检测失败.
我不知道,为什么这不起作用.
关于Sublime Text,两个行结尾都是相同的.
网上有很多关于这方面的话题,但我发现它们都不适合我.我希望你有一些想法,因为git似乎,它不想帮助我.:/
我有一个代表Google Play商店徽章的SVG:
<?xml version="1.0" encoding="utf-8"?>
<svg id="master-artboard" viewBox="0 0 740.4884643554688 219.59970092773438" version="1.1" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMinYMin meet">
<defs><linearGradient id="a" x1="31.8" y1="183.29" x2="15.02" y2="166.51" gradientTransform="matrix(1 0 0 -1 0 202)" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#00a0ff"/>
<stop offset=".01" stop-color="#00a1ff"/>
<stop offset=".26" stop-color="#00beff"/>
<stop offset=".51" stop-color="#00d2ff"/>
<stop offset=".76" stop-color="#00dfff"/>
<stop offset="1" stop-color="#00e3ff"/>
</linearGradient><linearGradient id="b" x1="43.83" y1="172" x2="19.64" y2="172" gradientTransform="matrix(1 0 0 -1 0 202)" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#ffe000"/>
<stop offset=".41" stop-color="#ffbd00"/>
<stop offset=".78" stop-color="orange"/>
<stop offset="1" stop-color="#ff9c00"/>
</linearGradient><linearGradient id="c" x1="34.83" y1="169.7" x2="12.07" y2="146.95" gradientTransform="matrix(1 0 0 …Run Code Online (Sandbox Code Playgroud)