Shell programming problem (Borne Shell or Korn Shell)
登录 | 论坛导航 -> 华新鲜事 -> 技术の宅 | 本帖共有 19 楼,当前显示第 13 楼 : 从楼主开始阅读 : 本帖树形列表 : 返回上一页
作者:香陵居士 (等级:16 - 好恐怖呀,发帖:22662) 发表:2005-01-07 09:33:16  13楼 
not the most efficient one, since i am new to perl. but enough for your work#!/usr/bin/perl @list = `ls test/*.b`; foreach $a (@list){ chomp($a); $com = "mv ".$a." $a.c"; exec($com); } assume your dir is "test" your old extension is .b , new one is .c I hope to see perl experts to show me the greatest power of perl by doing same job using many and much more efficient ways :)
I mean shell script... :P
Perl is not installed yet.
最新推出专栏《倾听索罗斯》 欢迎大家前来捧场!

Yeah!
欢迎来到华新中文网,踊跃发帖是支持我们的最好方法!原文 / 传统版 / WAP版只看此人从这里展开收起列表

本帖共有 19 楼,当前显示第 13 楼,本文还有 N-1 层楼,要不你试试看:点击此处阅读更多 >>



请登录后回复:帐号   密码