【脚本】1、使用多个Shell命令#cd;ls-a命令过长时使用反斜线字符(\)在命令行上扩充示例:#echo“hello\>world”2、编辑Shell脚本新建文件,并以.sh为扩展名,编辑脚本。显示消息:使用echo打印字符串时可以不需要加引号,但是如果字符串中有引号,那就需要另外的引号括起..
分类:
系统相关 时间:
2014-12-26 18:53:27
阅读次数:
170
#include
using namespace std;
void main()
{
int i,n;
cout
cin>>n;
for (i=1;i
{
for(int j=0;j
cout
for (int k=0;k
{
if (k
{
printf("%2d",i-k);
}
else
{
printf("%2d",k-i+2);
}
...
分类:
其他好文 时间:
2014-12-26 18:43:41
阅读次数:
227
近期用shell在处理数据时,发现read命令在读取数据时会把\t替换成空格,以及行末尾的\t舍弃。查看read的help,发现-r可以保留转义字符,搜了一下有人也说可以用-r,但是我的实验结果却是即使-r也还是依旧。无奈该用awk进行的数据处理。使用\t作为数据字段分割符在数据挖掘过程中是经常.....
分类:
其他好文 时间:
2014-12-26 18:31:39
阅读次数:
143
1,ocfs22,crmsh(cluster management shell,)==crm shell[pacemaker OpenAIS,heartbeat,corosync,crmsh]3,开源的ceph pk RedHat Glustercrm-moncorosync-cfgtool,cor...
分类:
其他好文 时间:
2014-12-26 18:25:30
阅读次数:
191
学习 shell脚本之前的基础知识:http://www.92csz.com/study/linux/12.htm shell脚本全面学习:http://blog.chinaunix.net/uid-9078183-id-2436460.html Shell脚本编程的常识:http://www.cnblogs.com/ebusi/arch...
分类:
系统相关 时间:
2014-12-26 16:55:50
阅读次数:
191
今天碰到一个问题,用node.js 执行shell命令时,会碰到有空格的目录和文件名。
按照常识应该要escape,当然可以自己写escape,但是要想处理复杂的escape,不是那么容易的。那么系统有没有提供呢?
google后发现可以使用
child_process.execFile(file, [args], [options], [callback])
中的args数组来帮自己...
分类:
Web程序 时间:
2014-12-26 16:44:11
阅读次数:
185
Summary
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 405 Accepted Submission(s): 247
Problem Description
Small W is playing a sum...
分类:
其他好文 时间:
2014-12-26 16:43:00
阅读次数:
125
#include #include //方式一#define DBG_PRINT (printf("%s:%u %s:%s:\t", __FILE__, __LINE__, __DATE__, __TIME__), printf) //方式二void MyPrintf(const char ...
分类:
其他好文 时间:
2014-12-26 16:20:39
阅读次数:
667
for l in `find /disk/mercInfoPicUpload/*/*_6_*.jpg`;do mv $l `echo $l |sed s/_6_/_5_/g`;done将/disk/mercInfoPicUpload及子目录下形如"*_6_*.jpg"的文件,并将"_6_"替换为"_...
分类:
系统相关 时间:
2014-12-26 16:08:28
阅读次数:
220
登录:bash先执行/etc/profile,再调用~/.bash_profile.注销:bash调用~/.bash_logout.执行新shell:在kde,gnone,icewm等桌面管理程序中,执行终端程序或手动执行/bin/bash,或在编辑程序中调用shell,会先调用/etc/bash....
分类:
系统相关 时间:
2014-12-26 14:23:15
阅读次数:
346