Chinaunix首页 | 论坛 | 博客
  • 博客访问: 617705
  • 博文数量: 184
  • 博客积分: 10057
  • 博客等级: 上将
  • 技术积分: 2505
  • 用 户 组: 普通用户
  • 注册时间: 2007-05-31 16:34
文章分类

全部博文(184)

文章存档

2010年(5)

2009年(104)

2008年(75)

我的朋友

分类: LINUX

2009-04-20 21:43:10

The command below can be used to convert a string into a valid filename. Uppercase letters are converted to lowercase, all difficult characters are removed and spaces are changed to underscores.

echo "#cLEa:n (%FILE%)" | tr [:upper:] [:lower:] | tr -d "[]()&~@#%^&*()_+=;:,\$" | tr " " "_"


This example will output 'clean_file'.
阅读(357) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~