[ncl-talk] how to get different file name in mv command?

Rick Brownrigg brownrig at ucar.edu
Mon Dec 15 10:47:13 MST 2014


Hi,

Just like in your print statement, in the system statement, write:

  system("mv fengxian " + filename)

Rick


On Mon, Dec 15, 2014 at 2:32 AM, 杨玉华 <yangyh at mail.typhoon.gov.cn> wrote:
>
>  Hi,
>
> I'd want to get different file name such (as fx0.dat, fx12.dat) for the
> following mv command, but I just get the same file named such as
> filename.dat or $filename.dat,  what should I need do?
>
>  do it=0,72,6
>
>   filename= "fx" + it + ".dat"
>     print("filename=" + filename)
>   system("mv fengxian.dat  'filename'") or system("mv fengxian.dat
> '$filename'")
>    end do     ; END OF times
>
> Thanks in advance!
>
> Yuhua
>
> =====================
> 名称: 中国气象局上海台风研究所
> 地址: 中国上海市徐汇区蒲西路166号
> 电话:(+86)021-64391966
> 传真:(+86)021-64391966
> ============================
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20141215/373704f1/attachment.html 


More information about the ncl-talk mailing list