The UNIX and Linux Forums
>
Top Forums
>
Shell Programming and Scripting
Rename a file if I don't know its exact original name?
User Name
Remember Me?
Password
Google UNIX.COM
Forums
Directory
Register
Forum Rules
FAQ
Contribute
Members List
Search
Today's Posts
Mark Forums Read
Thread
:
Rename a file if I don't know its exact original name?
View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
#
2
(
permalink
)
03-03-2006
vgersh99
Moderator
Join Date: Feb 2005
Location: Boston, MA
Posts: 3,162
Code:
echo 'SCA20060303_17514_IN.TXT' |
sed
's#^\([^_][^_]*\)_[0-9][0-9]*\(.*\)#\1\2#'
vgersh99
View Public Profile
Find all posts by vgersh99