Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Rename multiple files, changing prefix, extension and dropping characters Post 302642541 by bbmcg on Thursday 17th of May 2012 03:00:59 PM
Old 05-17-2012
AWESOME. THAT'S IT!!!!

Appreciate all the help from everyone. It all helps, and will be useful as I try to piece this stuff together going forward.

Sorry for so many questions, appears I have a lot of work to do to get up to speed as a "Dummie"
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Renaming multiple files, to get rid of extension

I have a good script to rename multiple files, but what's the best way I can remove some text from multiple filenames? Say I have a directory with 35 files with a .XLS at the end, how can I rename them to remove the .XLS but keep everything the same, without having to mv manually. Thanks. (6 Replies)
Discussion started by: nj78
6 Replies

2. UNIX for Dummies Questions & Answers

Removing prefix from multiple files and renaming file extension

Hello i have the files in this format pdb1i0t.ent pdb1lv7.ent pdb1pp6.ent pdb1tj2.ent pdb1xg2.ent pdb2b4b.ent pdb2ewe.ent Now i have to remove the prefix pdb from all the files and also i need to change the extension of .ent to .txt The new file should look like this ... (3 Replies)
Discussion started by: empyrean
3 Replies

3. Shell Programming and Scripting

Combining multiple files into one with the same name/different extension

I've been trying to find information in regard to creating a script that will generate HTML files. I currently have a series of files that contain code I need to surround with a <textarea> tag for easy viewing. I have about a thousand files that contain code, one file that contains the HTML code up... (10 Replies)
Discussion started by: 12o
10 Replies

4. Shell Programming and Scripting

Rename files and directories with special characters

Hello guys, I was looking for a shell script that removes all the special characters from the files and the subdirectories recursively. I could not locate it any more. Dose any body have a similar script that dose that? Thanks for the help. AV (0 Replies)
Discussion started by: avatar_007
0 Replies

5. Shell Programming and Scripting

ksh command to rename all files with no extension

hi! i want to rename all files with no extension with the extension DAT. with this command ls |grep -v "\\." i can list files but i dont know how i am going to rename them.. so i tried FILE_LIST=ls |grep -v "\\." for TEST_FILE in ${FILE_LIST} do mv $TEST_FILE... (2 Replies)
Discussion started by: kouppoua
2 Replies

6. Shell Programming and Scripting

Rename all files (filename with spaces) to different extension

Hi, I have files with filenames as below. SGM Daily Sales Email-en-us-05312012.xlwa I want to rename it in .xls. I am writing a script to change this, as there can be multiple files in subfolders. I have the following script. #!/bin/ksh for oldfile in $(find... (1 Reply)
Discussion started by: mac4rfree
1 Replies

7. Red Hat

How to rename files to files with mv extension?

currently in my directories $ ls -lrth total 32K -rw-r--r-- 1 oracle oinstall 864 Feb 25 16:01 cor_bin_gateway_cnt.sql -rw-r--r-- 1 oracle oinstall 782 Feb 25 16:01 mer_bin_gateway_cnt.sql I want to rename files with *.sql to *.mv extension, but when I execute the following $ mv... (1 Reply)
Discussion started by: jediwannabe
1 Replies

8. UNIX for Dummies Questions & Answers

Rename multiple files in shell bash, changing elements order.

Hi, I want to rename several files like this: example: A0805120817.BHN A0805120818.BHN ..... to: 20120817.0805.N 20120818.0805.N ...... How can i do this via terminal or in shell bash script ? thanks, (6 Replies)
Discussion started by: pintolcv
6 Replies

9. Shell Programming and Scripting

How to rename all files at a time by appending some characters at the begining?

Hi I have a list a filename in a directory starting with particular pattern for example: abc_1234.txt abc_7565.txt abc_7676.txt abc_7765.txt i need to rename all these files by appending bck. or bck_ Expected output: bck.abc_1234.txt bck.abc_7565.txt bck.abc_7676.txt... (1 Reply)
Discussion started by: Little
1 Replies

10. Shell Programming and Scripting

Curl command to download multiple files with a file prefix

I am using the below curl command to download a single file from client server and it is working as expected curl --ftp-ssl -k -u ${USER}:${PASSWD} ftp://${HOST}:${PORT}/path/to/${FILE} --output ${DEST}/${FILE} let say the client has 3 files hellofile.101, hellofile.102, hellofile.103 and I... (3 Replies)
Discussion started by: r@v!7*7@
3 Replies
INNUPGRADE(8)						    InterNetNews Documentation						     INNUPGRADE(8)

NAME
innupgrade - Upgrade INN configuration files SYNOPSIS
innupgrade directory innupgrade [-t type] -f file DESCRIPTION
innupgrade is intended to be run during a major upgrade of INN to fix the configuration files with any required changes. If given a directory, it will scan that directory for any files that it has updates defined for, try to perform those updates, and replace the files with updated versions if applying the updates resulted in any changes. The old versions of the files will be saved with a ".OLD" extension. If the -f flag is used, only that file will be updated. If the file name doesn't match the standard file name of an INN configuration file, the optional -t flag may be given to specify the type. See "EXAMPLES" for an example of this. Currently, innupgrade knows how to apply the following updates: inn.conf o Quote values with whitespace and comment out keys with no values, required for the change in configuration parsers introduced in INN 2.4. The new format is not backward compatible with the previous parser, since the previous parser will include the double-quotes in the value of the parameter. o Add the hismethod parameter if not found (introduced in INN 2.4, with the default value "hisv6") and rename nntpactsync to incominglogfrequency (since INN 2.5). o If the overview.fmt file exists, its content is merged in the extraoverviewadvertised and extraoverviewhidden parameters introduced in INN 2.5. The file is then renamed to overview.fmt.OLD. o If the sasl.conf file exists, its content is merged in the tlscapath, tlscafile, tlscertfile and tlskeyfile parameters introduced in INN 2.5. The file is then renamed to sasl.conf.OLD. newsfeeds o Replace the use of startinnfeed with the appropriate direct invocation of innfeed or imapfeed. A few obsolete programs or configuration files are renamed with a ".OLD" extension by innupgrade. Obsolete man pages are directly removed. Normally, innupgrade should be run at least on the pathetc directory after any upgrade of INN other than a patch release (any upgrade that changes the first or second version numbers). This may occur automatically during the upgrade process. OPTIONS
-f file Only act on file rather than working on an entire directory. -t type For a file specified with -f, parse it and upgrade it as if it were named type. Used for upgrading files with the same syntax as normal INN configuration files but with different names. Only makes sense in combination with -f. EXAMPLES
Upgrade any configuration files found in pathetc and append a ".OLD" extension to obsolete files in pathetc: innupgrade <pathetc in inn.conf> Upgrade only /news/etc/inn.conf: innupgrade -f /news/etc/inn.conf Upgrade a file named inn-special.conf that should have the same syntax as inn.conf: innupgrade -t inn.conf -f inn-special.conf Any upgrade rules that apply to inn.conf will be applied to the alternate file. HISTORY
Written by Russ Allbery <rra@stanford.edu> for InterNetNews. $Id: innupgrade.pod 8415 2009-04-12 20:19:35Z iulius $ INN 2.5.3 2009-05-21 INNUPGRADE(8)
All times are GMT -4. The time now is 02:57 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy