我尝试使用有关生成文件的正则表达式。
示例
11.txt 22.txt . 99.txt
我使用regEx和模式touch {1..9}{1..9}.txt
结果是
11.txt 21.txt 31 txt.99.txt
这对我没用。我不想像regEx一样{11,22,33,44,55,66,77,88,99}.txt
请推荐技术上的我。
发布于 2013-04-04 14:22:20
也许这对你有用:
$ seq -f'touch %g.txt' 11 11 99
touch 11.txt
touch 22.txt
touch 33.txt
touch 44.txt
touch 55.txt
touch 66.txt
touch 77.txt
touch 88.txt
touch 99.txt若要在磁盘上创建文件:
$ seq -f'touch %g.txt' 11 11 99|sh发布于 2013-04-04 14:11:08
(\d)\1在regex中使用此构造,\1是平均双prev表达式。
https://stackoverflow.com/questions/15813527
复制相似问题