Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mathematically Manipulating Numbers in File Names

Status
Not open for further replies.

jmarkus

Technical User
Oct 15, 2002
124
CA
I have a file name that looks like "BALL_JOINT-213029.csv"

I want to decrement the number in the filename by 1, i.e. "BALL_JOINT-213028.csv"

Can I do this using sed or regular UNIX scripting?

Thanks,
Jeff
 
Oops, nevermind. I figured out I need to used double parentheses.

Jeff
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top