Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Help with multiple file rename - change case of part of file name Post 76543 by rahul123_libra on Wednesday 29th of June 2005 04:01:34 AM
Old 06-29-2005
THis is for 1 particular case

Quote:
Originally Posted by vibhor_agarwali
Something using sed:

for filename in *.jpg;
do
echo $filename | sed -e 's/Aiyd/AIYD/g'
done

This is for 1 particular case ( aiyd ) and not for all the options

Isnt it ?
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Rename part of multiple files

Hello, I have about 200 files named like script1234_test.sh script3434_test.sh and so on... I am trying to write a script that will rename those files from test to dev, keeping the rest of the file name intact. Could anyone help? Thanks. (4 Replies)
Discussion started by: sajjad02
4 Replies

2. Shell Programming and Scripting

Rename multiple file from file listing

I am new at Linux/UNIX programming. Here is my problem. I had one big file which I split using the command csplit -k -s -f april.split. april '/^ISA/' '{10000}' So now I have multiple files with names april.split.01 april.split.02 april.split.03 But I need the name of the file like... (5 Replies)
Discussion started by: yshahiac
5 Replies

3. Shell Programming and Scripting

Multiple rename part of scripts

i have about 30 scripts for example: test, test1,test2, test3, test4,..... inside every scripte is code like this: echo "input check OK" how to rename this line in multiple scripts in this: echo "input error!" (2 Replies)
Discussion started by: waso
2 Replies

4. Shell Programming and Scripting

rename file by removing some part of the file name

I am special requirements to rename file. I have files with names like below: 1_firstname1_lastname1.html 2_firstname2_lastname2.html 3_fistname3_lastname2.html I would like these file to be renamed as below firstname1_lastname1.html firstname2_lastname2.html... (5 Replies)
Discussion started by: McLan
5 Replies

5. UNIX for Dummies Questions & Answers

Shell script to rename or change file extension case.

I searched the forum, but there was different type of rename. Hello. I have files in folder. Like: xxxxxxxx1.html or xxxxxxxx2.txt or xxxxxxxx3.tar.gz and how to rename or change file extension case to xxxxxxxx1.htm or xxxxxxx2.TXT or (5 Replies)
Discussion started by: Sheldon
5 Replies

6. Shell Programming and Scripting

Multiple file rename (change in filename in unix with single command

Dear All, Please help ! i ham having 300 file with E.G. PMC1_4567.arc in seq. like PMC1_4568.arc,PMC1_4569.arc ...n and so on.. i want all those file to be rename like PMC_4567.arc ,PMC_4568.arc .. mean i want to remove 1 from first file name .. pls help.. (6 Replies)
Discussion started by: moon_22
6 Replies

7. UNIX for Dummies Questions & Answers

[Solved] Rename file name / remove part of name

I have a whole file structure with jpeg files where I want to remove a part of the file name. An application added in many files a case conflict in the naming "xyz 017.jpg (Case Conflict 1)" So, can someone help me how to get rid of the " (Case Conflict 1)"? What I have is this: find . -name... (2 Replies)
Discussion started by: borobudur
2 Replies

8. Shell Programming and Scripting

Find and rename part of a file

hi, Need your help. I need to write a script for below.. i have two files in directory /home/abc as below: Watch_20140203_abc.dat Watchnow_20140203_abc.dat I have to copy this file from /home/abc to /home01/home02 after that i have to rename the date part in above two files... (1 Reply)
Discussion started by: Vivekit82
1 Replies

9. Shell Programming and Scripting

How to rename last part of file ?

Hi, I have large number of files like below - UNIX FY17 D21-1c Active user audit - NPP dir owner listing(vctmstt01)_072816 - Notepad.pdf UNIX FY17 D21-1c Active user audit - TTMS dir owner listing(pvcdmot35)_072816 - Notepad.pdf UNIX FY17 D21-1c Active user audit - PCP dir owner... (3 Replies)
Discussion started by: solaris_1977
3 Replies
PTS_RENAME(1)						       AFS Command Reference						     PTS_RENAME(1)

NAME
pts_rename - Changes the name of a Protection Database entry SYNOPSIS
pts rename -oldname <old name> -newname <new name> [-cell <cell name>] [-noauth] [-localauth] [-force] [-help] pts ren -o <old name> -ne <new name> [-c <cell name>] [-no] [-l] [-f] [-h] DESCRIPTION
The pts rename command changes the name of the user, machine, or group entry specified by the -oldname argument to the name specified by the -newname argument. It is not possible to change a user or machine entry's name to look like a regular group entry's name (have a colon in it). Members of the system:administrators group can change a regular group name into a prefix-less name and vice versa. When changing a prefix- less group name into a regular group name or a regular group name to another regular group name, the owner field of the new name (the part before the colon) must correctly reflect the group's owner. Changing a regular group's owner with the pts chown command automatically changes the owner field (the part before the colon) of the group's name, but does not change the owner field of any groups owned by the group. Use this command to rename those groups to a form that accurately reflects their ownership. CAUTIONS
By convention, many aspects of an AFS user account have the same name as the user's Protection Database entry, including the Authentication Database entry, volume, and mount point. When using this command to change a user name, also change the names of all related entities to maintain consistency. For instructions, see the chapter on user accounts in the OpenAFS Administration Guide. OPTIONS
-oldname <old name> Specifies the current full name of the entry. -newname <new name> Specifies the new full name for the entry. For regular groups, the owner field (the part before the colon) of the new name must reflect the actual ownership of the group. -cell <cell name> Names the cell in which to run the command. For more details, see pts(1). -force Enables the command to continue executing as far as possible when errors or other problems occur, rather than halting execution at the first error. -help Prints the online help for this command. All other valid options are ignored. -localauth Constructs a server ticket using a key from the local /etc/openafs/server/KeyFile file. Do not combine this flag with the -cell or -noauth options. For more details, see pts(1). -noauth Assigns the unprivileged identity anonymous to the issuer. For more details, see pts(1). EXAMPLES
The following example changes the name of the group staff, owned by the privileged user "admin", to "admin:staff": % pts rename -oldname staff -newname admin:staff The following example changes the name of the group "admin:finance" to the group "finance". The issuer must belong to the system:administrators group. % pts rename -oldname admin:finance -newname finance PRIVILEGE REQUIRED
To change a regular group name to a prefix-less name or vice versa, or to change a user or machine entry's name, the issuer must belong to the system:administrators group. To change a group name to a new name of the same type (regular or prefix-less), the issuer must own the group or belong to the system:administrators group. SEE ALSO
pts(1), pts_chown(1) COPYRIGHT
IBM Corporation 2000. <http://www.ibm.com/> All Rights Reserved. This documentation is covered by the IBM Public License Version 1.0. It was converted from HTML to POD by software written by Chas Williams and Russ Allbery, based on work by Alf Wachsmann and Elizabeth Cassell. OpenAFS 2014-04-08 PTS_RENAME(1)
All times are GMT -4. The time now is 07:05 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy