windows server 2012将计算机图标添加到桌面
2014-09-23 11:19
288 查看
在awk中引用外部变量会无法生效,但使用双引号时候,内置变量会不识别;解决方法是使用三引号;localhost ~]$ more awkfile
this is one
this is two
this is three
this is four
this is five
this is six
this is seven
$ awk '{print $3}' awkfile $ awk "{print $3}" awkfile
one this is one
two this is two
three this is three
four this is four
five this is five
six this is six
seven this is seven
[@localhost ~]$ more awk.sh
#!/bin/bash
echo "-----1111111111------------"
awk 'NR==2 {print $3}' awkfile
echo "-----222222222-------------"
awk "NR==2 {print $3}" awkfile
echo "-----333333333-------------"
i=2
awk 'NR==$i {print $3}' awkfile
echo "-----444444444-------------"
awk "NR==$i {print $3}" awkfile
echo "-----555555555-------------"
awk "NR==$i "'{print $3}'"" awkfile
[@localhost ~]$
[@localhost ~]$ sh awk.sh
-----1111111111------------
two
-----222222222-------------
this is two
-----333333333-------------
-----444444444-------------
this is two
-----555555555-------------
two
[@localhost ~]$
以上是个人浅薄经验,以此进行记录。
本文出自 “大亮” 博客,请务必保留此出处http://allveny.blog.51cto.com/8994099/1683930
this is one
this is two
this is three
this is four
this is five
this is six
this is seven
$ awk '{print $3}' awkfile $ awk "{print $3}" awkfile
one this is one
two this is two
three this is three
four this is four
five this is five
six this is six
seven this is seven
[@localhost ~]$ more awk.sh
#!/bin/bash
echo "-----1111111111------------"
awk 'NR==2 {print $3}' awkfile
echo "-----222222222-------------"
awk "NR==2 {print $3}" awkfile
echo "-----333333333-------------"
i=2
awk 'NR==$i {print $3}' awkfile
echo "-----444444444-------------"
awk "NR==$i {print $3}" awkfile
echo "-----555555555-------------"
awk "NR==$i "'{print $3}'"" awkfile
[@localhost ~]$
[@localhost ~]$ sh awk.sh
-----1111111111------------
two
-----222222222-------------
this is two
-----333333333-------------
-----444444444-------------
this is two
-----555555555-------------
two
[@localhost ~]$
以上是个人浅薄经验,以此进行记录。
本文出自 “大亮” 博客,请务必保留此出处http://allveny.blog.51cto.com/8994099/1683930
相关文章推荐
- Windows Server 2012将计算机图标添加到桌面
- Windows Server 2012将计算机图标添加到桌面
- Windows Server 2012(Win8)将计算机图标添加到桌面
- Windows Server 2012 如何将计算机图标添加到桌面
- windows server 2012将计算机图标添加到桌面(图文教程)
- windows server 2012将计算机、回收站、文档等图标添加到桌面
- windows server 2012将计算机图标添加到桌面(图文教程)(转)
- windows server 2012将计算机图标添加到桌面
- Windows Server 2012(Win8)将计算机图标添加到桌面
- Windows Server 2012 R2在桌面上显示计算机/网络图标
- Windows Server 2012 R2在桌面上显示计算机/网络图标
- Windows Server 2012 R2在桌面上显示计算机/网络图标
- 在Windows Server 2012中如何快速开关桌面上经典的“计算机、我的文档”等通用图标
- Windows Server 2012 R2在桌面上显示计算机/网络图标
- Windows Server 2012 R2在桌面上显示计算机/网络图标
- Windows Server 2012 R2在桌面上显示计算机/网络图标
- Sever 2008,2012 如何添加计算机图标到桌面
- Windows Server 2012 R2 展示在桌面显示计算机图标
- Windows Server 2012 R2在桌面上显示计算机/网络图标
- Windows Server 2012 R2在桌面上显示计算机/网络图标