码迷,mamicode.com
首页 >  
搜索关键字:shell memcache printf    ( 45225个结果)
Linux中shell变量的含义
$# 是传给脚本的参数个数 $0 是脚本本身的名字 $1 是传递给该shell脚本的第一个参数 $2 是传递给该shell脚本的第二个参数 $@ 是传给脚本的所有参数的列表 $* 是以一个单字符串显示所有向脚本传递的参数,与位置变量不同,参数可超过9个 $$ 是脚本运行的当前进程ID...
分类:系统相关   时间:2014-08-12 13:12:54    阅读次数:228
python中如何使用shell命令, 及python 与shell 中的变量相互通信
1. python中使用shell命令有多种方法,我自己觉得比较好用的是用commands模块:import commandsa,b = commands.getstatusoutput("ls -Al")a是退出状态(int类型), b是shell 命令的输出结果python -> shell:1...
分类:编程语言   时间:2014-08-12 13:11:34    阅读次数:228
用C语言怎么实现复制自己
#include #include int main(int argc, char *argv[]) { char str[80]; int i = 0; for(i = 0; i { sprintf(str, "cp %s %d%s", argv[0], i, ".out");  //在WIN下用copy代替cp system(str); } //printf...
分类:编程语言   时间:2014-08-12 10:25:13    阅读次数:196
题目555-相反输出-nyoj20140812
#includeint main(){int a[10];while(scanf("%d%d%d%d%d%d%d%d%d%d",&a[0],&a[1],&a[2],&a[3],&a[4],&a[5],&a[6],&a[7],&a[8],&a[9])==10){printf("%d %d %d %d ...
分类:其他好文   时间:2014-08-12 10:13:33    阅读次数:183
题目556-最大公约数-nyoj20140812
#include int main(){ int m,n; while(scanf("%d,%d",&m,&n)!=EOF) { int i; for(i=m;i>0;i--) if(m%i==0&&n%i==0) break; printf("%d\n",i); } return 0; }
分类:其他好文   时间:2014-08-12 10:07:33    阅读次数:201
python调用shell命令
python调用shell命令 1.1 ??os.system(command) ???????在一个子shell中运行command命令,并返回command命令执行完毕后的退出状态。这实际上是使用C标准库函数system()实现的。这个函数在执行command命令...
分类:编程语言   时间:2014-08-12 09:06:34    阅读次数:240
python学习第三天
Python学习第三天1.python的文件类型1)源代码Python源代码的文件以‘py’为扩展名,由python程序解释,不需要编译例1:vim1.py#!/usr/bin/python和shell脚本一样,需要注明有哪个程序解释)Print‘helloworld’Chmoda+x1.py./1.py运行结果为:helloworld2)字节代码Python源代..
分类:编程语言   时间:2014-08-12 03:39:14    阅读次数:301
linux 之shell脚本练习
一、#!/bin/bash#自动添加用户,并使初始密码为用户账户名,且用户登录时强制其更改密码i=1while[$i-le15]doif[$i-le9]thenuseradduser0$iecho"user0$i"|passwd--stdinuser0$i&>/dev/nullchage-d0user0$ielseuseradduser$iecho"user$i"|passwd--stdinuser$i&>/de..
分类:系统相关   时间:2014-08-12 03:35:44    阅读次数:242
windows命令行下导入excel数据到SQLite数据库
1、转换文件格式,防止中文乱码:将excel保存成"CSV(逗号分隔)(*.csv)"格式,关闭文件,用记事本打开刚才保存的.csv文件,然后另存为UTF-8格式文本。需要注意的是,经过这样的转换,数字也全变成文本了。2、通过adb shell(adb.exe存放在android开发软件安装文件夹中...
分类:数据库   时间:2014-08-12 03:14:33    阅读次数:269
ACM: A + B Problem II (两个大整数相加)
Code:#include #include #include #define MAX 1000//给数组赋值void arrV(int a[],int len,int p){ int i; for(i=0;i-1;i--){ printf("%d",a[i]); }}//两个数组相加void a....
分类:其他好文   时间:2014-08-12 00:26:33    阅读次数:216
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!