2

What's the quickest way to take a string like "app.js" and rename it to "app.min.js" in bash?

I was hoping for an awk regex or something where I can do:

s/(.*?)\.js/$1.min.js/
4

1 回答 1

3

这是一种方式:

string=app.js
string=${string/./.min.}
于 2012-07-14T00:05:20.143 回答