|
zch1366
中级用户
  
积分 326
发帖 148
注册 2005-12-16
状态 离线
|
『楼 主』:
如何把 887033 这几个数字输入空格里面
如何把 887033 这几个数字输入空格里面,并自动生成文档输出,谢谢有心人帮!!!
生成前:
指数:=INDEXC,COLOR0009DF,NODRAW;
±点:=INDEXC-REF(INDEXC,1),COLOR0009DF,NODRAW;
{大盘均线};
MA05:MA(" $C",05),COLORWHITE;
MA10:MA(" $C",10),COLORYELLOW;
MA20:MA(" $C",20),COLORRED;
MA60:MA(" $C",60),COLORGREEN;
{GDP 观大盘副图}
DRAWKLINE(" $H"," $O"," $L"," $C" ;
银行指数:" $C",COLORWHITE,NODRAW;
{±:" $C"-REF(" $C",1),COLORLIGRAY,NODRAW;}
±:" $CLOSE"-REF(" $CLOSE",1),COLOR00DDDD,NODRAW,COLORWHITE;
% " $CLOSE"-REF(" $CLOSE",1))*100/REF(" $CLOSE",1)
,COLOR00DDDD,NODRAW,COLORWHITE;
生成后:
指数:=INDEXC,COLOR0009DF,NODRAW;
±点:=INDEXC-REF(INDEXC,1),COLOR0009DF,NODRAW;
{大盘均线};
MA05:MA("887033$C",05),COLORWHITE;
MA10:MA("887033$C",10),COLORYELLOW;
MA20:MA("887033$C",20),COLORRED;
MA60:MA("887033$C",60),COLORGREEN;
{GDP 观大盘副图}
DRAWKLINE("887033$H","887033$O","887033$L","887033$C" ;
银行指数:"887033$C",COLORWHITE,NODRAW;
{±:"887033$C"-REF("887033$C",1),COLORLIGRAY,NODRAW;}
±:"887033$CLOSE"-REF("887033$CLOSE",1),COLOR00DDDD,NODRAW,COLORWHITE;
% "887033$CLOSE"-REF("887033$CLOSE",1))*100/REF("887033$CLOSE",1)
,COLOR00DDDD,NODRAW,COLORWHITE;
|
|
2010-11-14 13:34 |
|
|
wewebb
初级用户
 
积分 66
发帖 53
注册 2009-10-9
状态 离线
|
『第
2 楼』:
可以尝试用 SED 把空格替换成 数字。如:
For Win 版的 SED
sed "s/\" \{6,\}/\"887033/g" Files
这句是把双引号后面的六个以上空格替换成 887033
[ Last edited by wewebb on 2010-11-14 at 14:35 ]
|
|
2010-11-14 14:20 |
|
|
zch1366
中级用户
  
积分 326
发帖 148
注册 2005-12-16
状态 离线
|
|
2010-11-14 20:12 |
|
|
zch1366
中级用户
  
积分 326
发帖 148
注册 2005-12-16
状态 离线
|
『第
4 楼』:
sed "s/\" \{6,\}/\"887033/g" Files
指数:=INDEXC,COLOR0009DF,NODRAW;
±点:=INDEXC-REF(INDEXC,1),COLOR0009DF,NODRAW;
{大盘均线};
MA05:MA(" $C",05),COLORWHITE;
MA10:MA(" $C",10),COLORYELLOW;
MA20:MA(" $C",20),COLORRED;
MA60:MA(" $C",60),COLORGREEN;
{GDP 观大盘副图}
DRAWKLINE(" $H"," $O"," $L"," $C";
银行指数:" $C",COLORWHITE,NODRAW;
{±:" $C"-REF(" $C",1),COLORLIGRAY,NODRAW;}
±:" $CLOSE"-REF(" $CLOSE",1),COLOR00DDDD,NODRAW,COLORWHITE;
%" $CLOSE"-REF(" $CLOSE",1))*100/REF(" $CLOSE",1)
,COLOR00DDDD,NODRAW,COLORWHITE;
不行阿,大哥
|
|
2010-11-14 20:12 |
|
|
wewebb
初级用户
 
积分 66
发帖 53
注册 2009-10-9
状态 离线
|
『第
5 楼』:
请看:
原文件 File.txt

用 SED 修改后输出到屏幕上:

将修改的结果重定位到一个新文件 NewFile.txt 上:
sed "s/\" \{6,\}/\"887033/g" File.txt > NewFile.txt
|
|
2010-11-14 21:46 |
|
|
zch1366
中级用户
  
积分 326
发帖 148
注册 2005-12-16
状态 离线
|
|
2010-11-17 21:53 |
|
|