Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

rename(1t) [opensolaris man page]

rename(1T)						       Tcl Built-In Commands							rename(1T)

__________________________________________________________________________________________________________________________________________________

NAME
rename - Rename or delete a command SYNOPSIS
rename oldName newName _________________________________________________________________ DESCRIPTION
Rename the command that used to be called oldName so that it is now called newName. If newName is an empty string then oldName is deleted. oldName and newName may include namespace qualifiers (names of containing namespaces). If a command is renamed into a different namespace, future invocations of it will execute in the new namespace. The rename command returns an empty string as result. EXAMPLE
The rename command can be used to wrap the standard Tcl commands with your own monitoring machinery. For example, you might wish to count how often the source command is called: rename ::source ::theRealSource set sourceCount 0 proc ::source args { global sourceCount puts "called source for the [incr sourceCount]'th time" uplevel 1 ::theRealSource $args } SEE ALSO
namespace(1T), proc(1T) KEYWORDS
command, delete, namespace, rename ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +--------------------+-----------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +--------------------+-----------------+ |Availability | SUNWTcl | +--------------------+-----------------+ |Interface Stability | Uncommitted | +--------------------+-----------------+ NOTES
Source for Tcl is available on http://opensolaris.org. Tcl rename(1T)

Check Out this Related Man Page

rename(3tcl)						       Tcl Built-In Commands						      rename(3tcl)

__________________________________________________________________________________________________________________________________________________

NAME
rename - Rename or delete a command SYNOPSIS
rename oldName newName _________________________________________________________________ DESCRIPTION
Rename the command that used to be called oldName so that it is now called newName. If newName is an empty string then oldName is deleted. oldName and newName may include namespace qualifiers (names of containing namespaces). If a command is renamed into a different namespace, future invocations of it will execute in the new namespace. The rename command returns an empty string as result. EXAMPLE
The rename command can be used to wrap the standard Tcl commands with your own monitoring machinery. For example, you might wish to count how often the source command is called: rename ::source ::theRealSource set sourceCount 0 proc ::source args { global sourceCount puts "called source for the [incr sourceCount]'th time" uplevel 1 ::theRealSource $args } SEE ALSO
namespace(3tcl), proc(3tcl) KEYWORDS
command, delete, namespace, rename Tcl rename(3tcl)
Man Page

15 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

perl rename failed

i have a file, which i want to rename, from my current directory to a backupdirectory. My perl code is below rename($s_filename,$backup.$s_filename ) all my variables are defined. but the rename failed. the file permission my file is "-rw-rw-r--". could this be a problem? I tried to use the... (9 Replies)
Discussion started by: new2ss
9 Replies

2. Solaris

rename multi files

dear all i have about 5142 file begin with (package jordba."packagename") i want to remove the package .jordba without touch the package name i need to stay the package name only can any body help me thanx (9 Replies)
Discussion started by: murad.jaber
9 Replies

3. Shell Programming and Scripting

rename multiple files

Hi, can anyone have a ksh script to rename multiple files (ie to remove .Z extension of the files) can someone correct this? for i in *.Z do var1 = substr($i, 1,at(".Z",$i)-1) mv $i $var1 done Thanks.. Antony (13 Replies)
Discussion started by: antointoronto
13 Replies

4. Shell Programming and Scripting

rename a lot of files again

here I go again...kinda hard to explain so I apologize. I need to rename a bunch of files in a directory. I need to remove the first three characters of the filename, and then toward the end of the filename there is constant text inside of brackets. here is a demo (not for real) 'ls -1' of the... (11 Replies)
Discussion started by: ajp7701
11 Replies

5. UNIX for Dummies Questions & Answers

Batch Renaming: Change files' extensions in many sub-directories

Hi all - I'm trying to rename a large number of files all at once and need some help figuring out the command line syntax to do it. I've already done quite a bit of research with the rename and mv commands, but so far haven't found a solution that seems to work for me. So: The files exist... (10 Replies)
Discussion started by: dave920
10 Replies

6. Shell Programming and Scripting

Read File and use contents to rename another

Hello guys, thank God that I found this forum. I hope that someone can help me because I don't have any idea on how to start it. I know that for some of you this is a very simple task but I'm not as advance on shell scripting like many people out there. I got this file with a permanent... (10 Replies)
Discussion started by: Shark Tek
10 Replies

7. Shell Programming and Scripting

Rename fail

I've a lot of file with an hyphen on filename, so I use rename for remove him ad substitute with an underscore but it fails $ rename 's/\-/\_/' * Unknown option: _ Unknown option: i Unknown option: r Unknown option: e Unknown option: e Unknown option: _ Unknown option: g Unknown... (12 Replies)
Discussion started by: cv313x
12 Replies

8. Shell Programming and Scripting

Grep and rename the filename

Hi All, Can you please help me. The situation is like this. There are many different file name in this directory. I have to grep all the file that the name start with "PTWO" and rename it to COM with the current date. This is the script that I have done and it hit an... (16 Replies)
Discussion started by: badbunny9316
16 Replies

9. Shell Programming and Scripting

Copy a file with different name

Hi, I have a txt file which contains a list of file addresses and i want to copy them one by one and rename then regardless what they are to 1,2,3,4,5,.... and since I have the list handy, I could I always know what each file is ;) So As I tested cp ./test/t.txt ./test2/2 works well,... (9 Replies)
Discussion started by: just_linux
9 Replies

10. UNIX for Dummies Questions & Answers

Renaming files in one file from names in other

Hi Guys, I have a small problem of renaming multiple files. For example I have names of a set of files in one directory like K2_34625-34675 K7_988963-988983 K12_773882-7734102 and the other set corresponding to the same is U_P_321_9_3_11.ab1 U_P_322_9_3_11.ab1 U_P_323_9_3_11.ab1 Now... (23 Replies)
Discussion started by: pawannoel
23 Replies

11. Emergency UNIX and Linux Support

File rename error

hi im new for unix, when i try to rename the file im getting error $ mv -9file.jpg 9file.jpg error is mv: invalid option --"9" Try 'mv --help' for more information. (10 Replies)
Discussion started by: gwgreen1
10 Replies

12. UNIX for Dummies Questions & Answers

look for specific values in a file and rename file with value found

Hi, i have a file with some data ..look for some specific value in the file and if found that value rename the file with the value found in the file.. ex.. File.txt 1236 43715825601ANDERSSON, 1236 437158256031963040120060901200609010000000 1236 43715825604123 MCCL AVE UPPER 1236 ... (11 Replies)
Discussion started by: dssyadav
11 Replies

13. Shell Programming and Scripting

How to rename file name?

Hi , Please help me am new in shell script how to rename file name as per previouse year date | cut -c 27-28 mv file XYP.ZAT15.PGPNX.TRDIY output should display renamed as XYP.ZAT15.PGPNX.TRDIY The file name should be renamed as XYP.ZAT15.PGPNX.TRDIY 15 is the... (9 Replies)
Discussion started by: jagu
9 Replies

14. UNIX for Beginners Questions & Answers

Renaming files by appending string from within file to filename

Greetings. I am working in a Linux environment and am trying to figure out a way to rename files in a directory by appending a unique strings that appears within a certain area in those files. I have gotten as far as identifying what that particular unique string is with a command like the... (10 Replies)
Discussion started by: HLee1981
10 Replies

15. Shell Programming and Scripting

Rename file using partial match to another

In the below I am trying to rename the contents within each data subfolder in a specific run, based on a partial match of the IonCode_0000_ in each file in the data subdirectory to $1 in f1. There will be multiple runs in f1 but each run in $uniq is unique and will be found in f1 and the rename... (27 Replies)
Discussion started by: cmccabe
27 Replies