<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[Ash_DMY的博客]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/Ash_DMY</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; Ash_DMY]]></copyright><item><title><![CDATA[js方法中var self=this的原因]]></title><link>https://blog.youkuaiyun.com/Ash_DMY/article/details/82669971</link><guid>https://blog.youkuaiyun.com/Ash_DMY/article/details/82669971</guid><author>Ash_DMY</author><pubDate>Wed, 12 Sep 2018 22:58:28 +0800</pubDate><description><![CDATA[每个函数在定义被ECMAScript解析器解析时，都会创建两个特殊的变量：this和arguments,换句话说，每个函数都有属于自己的this对象，这个this对象是在运行时基于函数的执行环境绑定的，即在全局对象中，this指向的是window对象；在自定义函数中，this对象指向的是调用这个函数的对象，
也就是说，this指向的是调用执行环境的那个对象。
如果是在函数嵌套环境中，this指代的...]]></description><category></category></item><item><title><![CDATA[Vue关于对象数组的双向数据绑定(props与watch)]]></title><link>https://blog.youkuaiyun.com/Ash_DMY/article/details/82589360</link><guid>https://blog.youkuaiyun.com/Ash_DMY/article/details/82589360</guid><author>Ash_DMY</author><pubDate>Mon, 10 Sep 2018 14:52:49 +0800</pubDate><description><![CDATA[Vue的数据双向绑定例子 

可以参考该网址https://www.cnblogs.com/xxcanghai/p/6124699.html

我写的这个是使用vue-cli编写的一个例子。

以下是父组件源码，绑定了一个对象然后使用props在子组件获取（此为单项绑定）。


&amp;lt;template&amp;gt;
    &amp;lt;div&amp;gt;
        &amp;lt;table id=&quot;perso...]]></description><category></category></item><item><title><![CDATA[select用法]]></title><link>https://blog.youkuaiyun.com/Ash_DMY/article/details/78322990</link><guid>https://blog.youkuaiyun.com/Ash_DMY/article/details/78322990</guid><author>Ash_DMY</author><pubDate>Mon, 23 Oct 2017 20:34:15 +0800</pubDate><description><![CDATA[select 语句

select表达式是bash的一种扩展应用，擅长于交互式场合。用户可以从一组不同的值中进行选择：
select var in ... ; do
　break;
done
.... now $var can be used ....


下面是select使用的例子：
1.
#!/bin/bash
##filename:what-lang-do-you-like]]></description><category></category></item><item><title><![CDATA[不同风格的for语句]]></title><link>https://blog.youkuaiyun.com/Ash_DMY/article/details/78289105</link><guid>https://blog.youkuaiyun.com/Ash_DMY/article/details/78289105</guid><author>Ash_DMY</author><pubDate>Thu, 19 Oct 2017 20:32:24 +0800</pubDate><description><![CDATA[foreach语言风格的for语句：


1.成批的添加50个用户

#!/bin/bash
##filename:addusers_foreach.sh
for x in 0{1..9} {10..50}  ; do
        useradd user${x}
        echo "centos" | passwd --stdin user${x}
        chag]]></description><category></category></item><item><title><![CDATA[for循环语法使用举例]]></title><link>https://blog.youkuaiyun.com/Ash_DMY/article/details/78276862</link><guid>https://blog.youkuaiyun.com/Ash_DMY/article/details/78276862</guid><author>Ash_DMY</author><pubDate>Wed, 18 Oct 2017 19:48:09 +0800</pubDate><description><![CDATA[for语句使用举例，可参考此网址点击打开链接
使用字面常量列表作为List
#!/bin/bash
##filename:for1--constant_as_list.sh
#使用字面列表作为List
for x in centos ubuntu gentoo opensuse
do
        echo "$x"
done
#若列表项中包含空格则必须使用引号括起来
for x in Li]]></description><category></category></item><item><title><![CDATA[while和until的使用]]></title><link>https://blog.youkuaiyun.com/Ash_DMY/article/details/78259406</link><guid>https://blog.youkuaiyun.com/Ash_DMY/article/details/78259406</guid><author>Ash_DMY</author><pubDate>Tue, 17 Oct 2017 13:29:11 +0800</pubDate><description><![CDATA[先说说上次在讲case语句用法中提到的在Ubuntu中有时候写的脚本不能正常运行的问题吧，虽然还没搞懂，不过似乎只需要把那个运行不对的脚本删掉重新在建一个然后就可以运行出来了，如果有大神知道这方面的bug的话希望能够指点一下萌新。




今天来看看循环结构while和until的使用举例吧


while 测试条件

do

     语句1

     语句2
]]></description><category></category></item><item><title><![CDATA[case语句使用举例]]></title><link>https://blog.youkuaiyun.com/Ash_DMY/article/details/78253744</link><guid>https://blog.youkuaiyun.com/Ash_DMY/article/details/78253744</guid><author>Ash_DMY</author><pubDate>Mon, 16 Oct 2017 20:21:58 +0800</pubDate><description><![CDATA[shell中的case语句：

可以把变量的内容与多个模板进行匹配,再根据成功匹配的模板去决定应该执行哪部分代码。
使用格式：
case 匹配母板 in
模板1 [ | 模板2 ] … ) 语句组 ;;
模板3 [ | 模板4 ] … ) 语句组 ;;
esac
case语句的匹配是从上往下地匹配顺序。因此，case语句编写的原则是从上往下，模板从特殊到普通。在C语言里，case语]]></description><category></category></item><item><title><![CDATA[if语句使用举例]]></title><link>https://blog.youkuaiyun.com/Ash_DMY/article/details/78243855</link><guid>https://blog.youkuaiyun.com/Ash_DMY/article/details/78243855</guid><author>Ash_DMY</author><pubDate>Sun, 15 Oct 2017 20:45:53 +0800</pubDate><description><![CDATA[if快捷键
——————————————————————————————————
[ ] && 如果为真则执行后面

[ ] || 如果为假则执行后面



文件表达式
——————————————————————————————————

if [ -f  file ]    如果文件存在
if [ -d dd   ]    如果目录存在
if [ -s file  ]]]></description><category></category></item><item><title><![CDATA[Shell更改一般文件或目录权限的脚本]]></title><link>https://blog.youkuaiyun.com/Ash_DMY/article/details/78227073</link><guid>https://blog.youkuaiyun.com/Ash_DMY/article/details/78227073</guid><author>Ash_DMY</author><pubDate>Fri, 13 Oct 2017 16:00:45 +0800</pubDate><description><![CDATA[编写一些简单的脚本来尝试运行吧
1.合理设置文件和目录的权限。


#!/bin/bash                                                                     
#filename:   chmodall

USAGE="Usage:$0"
DIR=${1:?"Error.$USAGE.You must specify a]]></description><category></category></item><item><title><![CDATA[学习Shell脚本(第四天)]]></title><link>https://blog.youkuaiyun.com/Ash_DMY/article/details/78219133</link><guid>https://blog.youkuaiyun.com/Ash_DMY/article/details/78219133</guid><author>Ash_DMY</author><pubDate>Thu, 12 Oct 2017 20:06:12 +0800</pubDate><description><![CDATA[Shell特殊变量使用举例

#!/bin/sh                                                                                              
#ScriptName:test.sh
#To test Positional Parameters & Special Parameters
 
echo]]></description><category></category></item><item><title><![CDATA[变量替换扩展]]></title><link>https://blog.youkuaiyun.com/Ash_DMY/article/details/78206725</link><guid>https://blog.youkuaiyun.com/Ash_DMY/article/details/78206725</guid><author>Ash_DMY</author><pubDate>Wed, 11 Oct 2017 18:18:06 +0800</pubDate><description><![CDATA[变量替换扩展:





功能
表达式
说明


使用默认值
${var:-word}
var存在且非空，则值为$var；若var未定义或为空值，则值为word，但var的值不变


赋予默认值
${var:=word}
var存在且非空，则值为$var；若var未定义或为空值，则值为word，且var被赋值word


非空或未定义报错
${var:?]]></description><category></category></item><item><title><![CDATA[学习Shell脚本(第二天)]]></title><link>https://blog.youkuaiyun.com/Ash_DMY/article/details/78203426</link><guid>https://blog.youkuaiyun.com/Ash_DMY/article/details/78203426</guid><author>Ash_DMY</author><pubDate>Wed, 11 Oct 2017 14:38:45 +0800</pubDate><description><![CDATA[昨天找出了有段时间没看过的Linux相关的书籍，看了一会之后感觉明白了书中自有黄金屋的道理。
今天就记录一些关于Shell变量的使用吧。




Shell变量大致分为三类：
1.内部变量:由系统提供，用户只能使用不能修改(内部变量指能够对bash shell脚本行为产生影响的变量，属于环境变量的范畴)。
2.环境变量:这些变量决定了用户工作的环境，不需要用户定义，可以直接在She]]></description><category></category></item><item><title><![CDATA[学习Shell脚本(第一天)]]></title><link>https://blog.youkuaiyun.com/Ash_DMY/article/details/78196352</link><guid>https://blog.youkuaiyun.com/Ash_DMY/article/details/78196352</guid><author>Ash_DMY</author><pubDate>Tue, 10 Oct 2017 19:27:55 +0800</pubDate><description><![CDATA[直接开始吧，主要是记录自己的点滴。


1.使用 vim 编写了 .sh 的脚本文件，引用变量需要 使用 $ 符号，变量名最好放在[ ]中。
2.写好了之后使用 ./+你的文件名(.是指当前目录)，也可以使用sh .sh的方式运行，至于bash就没必要了，毕竟懒人 0.0
直接运行的话发现运行不起，并且提示了权限禁止，那是因为这个文件创建之后没有赋予可执行权限，最好使用 chmod +x]]></description><category></category></item></channel></rss>