Sponsored Content
Full Discussion: Rename Multiple Files
Top Forums UNIX for Dummies Questions & Answers Rename Multiple Files Post 302815935 by Ralze34 on Sunday 2nd of June 2013 09:42:06 PM
Old 06-02-2013
Quote:
Originally Posted by jim mcnamara
Oh, [expletive deleted]. I did not test my code. My bad.

See my original post. Find the line with awk in it. See the red pipe: |
Add that and your code should be okay.

Caveat. Again - you seem to have a windows-centric file naming world view. Which is fine on Windows. For cygwin: Spaces in file names require other approaches than the one I posted.
I've only ever worked on Windows machines. I'm definitely willing to expand my horizons though! Looks like that made a big difference (would you mind explaining what each thing is doing a bit more in detail, just trying to learn). Here is the output now:
Code:
rename [WBDS]Show_Title_-_038_-_Episode_Name_[DR][x264][055F2967].mkv to s01e01_Episode_ Name

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Rename multiple files

Hello, I want to rename multiple files at a time and I don't know how to do it. I have various ".mp3" files, like "band name - music name.mp3" and I want to remove the "band name" from all files. Anybody knows how to do it using shell script or sed or even perl? Thanks (7 Replies)
Discussion started by: luiz_fer10
7 Replies

2. 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

3. Shell Programming and Scripting

now to rename multiple files

I have several hundred files in one directory which I need to move to another directory with the new extension, for example: /bb/data/rptmgr* are in the source directory need to be moved to /bb/data55/rptmgr*.new Is there an efficient way to do it? Thanks -A (4 Replies)
Discussion started by: aoussenko
4 Replies

4. UNIX for Dummies Questions & Answers

How to rename multiple files

Hi all, I have some files like: pickup.0000043200.t001.t001.data pickup.0000043200.t001.t002.data pickup.0000043200.t002.t001.data pickup.0000043200.t002.t002.data pickup.0000043200.t003.t001.data pickup.0000043200.t003.t002.data I need to rename these files to ... (4 Replies)
Discussion started by: a_dor8
4 Replies

5. Shell Programming and Scripting

Rename multiple files

hello: I have multiple files with names like: somestring_y2010m01d01 somestring_y2010m01d02 .......... somestring_y2010m12d31 How... (4 Replies)
Discussion started by: sylcam
4 Replies

6. Shell Programming and Scripting

Rename multiple files

Hi, In my directory I have many files, for e.g. file_123 file_124 file_125 file_126 file_127 Instead of renaming these files one by one, I would like to rename them at a same time using same command... they should appear like 123 124 125 126 127 What command(awk or ls or... (3 Replies)
Discussion started by: juzz4fun
3 Replies

7. Shell Programming and Scripting

How to rename multiple files at one go?

Hi, I have hundreds of files with XXX in their file name and I want to rename all of them with YYY in place of XXX. for ex: $ ls -1 123XXX789 345XXX678 Output $ ls -1 123YYY789 345YYY678 I know we can loop in each file and sed to replace and rename each file but ren *XXX* *YYY*... (4 Replies)
Discussion started by: reddyr
4 Replies

8. Shell Programming and Scripting

Rename a multiple files

I have multiple files in folder which i want to rename. hence I am using the below command in my script by I get an error: export XXX_LOG_DIR="${LOG_DIR}/${XXX_HOST}/xxx/${REPORT_DATE}" mv $XXX_LOG_DIR/*.audit.gz $XXX_LOG_DIR/*.audit.log.gz But I get the below error: mv: target... (5 Replies)
Discussion started by: karan8810
5 Replies

9. Shell Programming and Scripting

SBATCH trinity for multiple files and rename/move the output files

Hey guys, I have wrote the following script to apply a module named "trinity" on my files. (it takes two input files and spit a trinity.fasta as output) #!/bin/bash -l #SBATCH -p node #SBATCH -A <projectID> #SBATCH -n 16 #SBATCH -t 7-00:00:00 #SBATCH --mem=128GB #SBATCH --mail-type=ALL... (1 Reply)
Discussion started by: @man
1 Replies

10. Shell Programming and Scripting

Rename multiple files in one go

OS : Oracle Linux 6.8 shell : bash As shown below, I have multiple files like below (query1-extract_aa, query1-extract_ab, query1-extract_ac, ....) $ ls -l total 235680 -rw-rw-r-- 1 reportusr reportusr 30M May 3 11:25 query1-extract_aa -rw-rw-r-- 1 reportusr reportusr 30M May 3 11:25... (5 Replies)
Discussion started by: kraljic
5 Replies
quagga(8)						  System Administration Commands						 quagga(8)

NAME
quagga - advanced routing protocol suite from www.quagga.net SYNOPSIS
Quagga is an advanced routing software package that provides a suite of TCP/IP based routing protocols. Quagga supports protocols such as RIPv1, RIPv2, RIPng, OSPFv2, OSPFv3, BGP-4, and BGP-4+. This document is provided for informational pur- poses to help users configure quagga under Solaris specifically. Further documentation on quagga configuration in general is provided at http://www.quagga.net. DESCRIPTION
Quagga consists of the following packages: o SUNWquaggar - Quagga root files o SUNWquagga-daemons - Quagga daemons o SUNWquagga-libs - Quagga private shared libraries o SUNWquagga-dev - Quagga private shared library headers o SUNWquaggaS - Quagga sources More defailed Quagga documentation is available from http://www.quagga.net/docs, or in the GNU Info format Quagga documentation installed in /usr/sfw/share/info. The Quagga routing protocol suite replaces SUNWzebra, and detection of SUNWzebra configuration during boot will lead to automatic transfer of configuration to quagga. If manual upgrade (without reboot) is required, configuration files under /etc/sfw/zebra should be transferred to /etc/quagga, and "routeadm -u" should be run. This will enable the appropriate quagga services, and run the daemons if those services dependencies are met. In Solaris, quagga daemons are managed by the following smf(5) services: svc:/network/routing/zebra:quagga zebra routing manager daemon svc:/network/routing/rip:quagga RIPv2 routing daemon svc:/network/routing/ripng:quagga RIPng routing daemon svc:/network/routing/bgp:quagga BGP routing daemon svc:/network/routing/ospf:quagga OSPF routing daemon svc:/network/routing/ospf6:quagga OSPF6 routing daemon Quagga daemons can be configured either via the smf(5) framework, or via routeadm(1M), the global dynamic routing management utility. Note that quagga was built without the vtysh (unified vty shell) utility, as it depends on a package not currently distributed with Solaris. COMMANDS
By default, in.routed and in.ripngd, managed by the svc:/network/routing/route and svc:/network/routing/ripng services respectively, are configured as default IPv4/IPv6 routing services. To disable these, either utilize routeadm(1M) or svcadm(1M) as follows: # routeadm -d route # routeadm -d ripng:default disables in.routed and in.ripngd respectively using routeadm(1M). # svcadm disable route:default # svcadm disable ripng:default disables in.routed and in.ripngd respectively using smf(1). Note that these services must be disabled or their quagga counterparts (rip:quagga, ripng:quagga) will not run, since they services specify to the smf framework that they and their quagga counterparts cannot run simultaneously. To enable quagga services, again either routeadm(1M) or svcadm(1M) can be used. Note that quagga services, like in.routed and in.ripngd, specify dependencies on ipv4(6)-routing(forwarding) services, so as with all smf(1) services, ensure the appropriate dependencies are enabled or the services will not start. For example, # routeadm -e rip:quagga # routeadm -e ipv4-routing -u enables quagga's RIPv2 daemon (the -u option above is required, as global ip routing/forwarding settings are not applied to the system until next reboot unless the -u is issued). To do the same via smf(1), # svcadm enable -r rip:quagga The "-r" option recursively enables rip:quagga's dependencies, which include the ipv4-routing service. The status of all routing daemon services can be displayed via routeadm(1M), run without options, or, through smf(1), via the svcs(1) com- mand. Commandline arguments to the quagga daemons can be altered by modifying the routing/daemon-args property, again either via routeadm(1M) or svccfg(1M): # routeadm -m rip:quagga daemon-args="-s" or # svccfg -s rip:quagga setprop routing/daemon-args="-s" # svcadm refresh rip:quagga The "refresh" is required to ensure the daemon re-reads its configuration. DIAGNOSTICS
To see status of all routing services, run routeadm(1M) without options. SEE ALSO
ripngd(8), ospfd(8), ospf6d(8), bgpd(8), zebra(8), routeadm(1M), svcadm(1M), svcs(1), svccfg(1M), smf(5) AUTHORS
See <http://www.quagga.net>, or the Info file for an accurate list of authors. SunOS 5.11 01 Aug 2006 quagga(8)
All times are GMT -4. The time now is 02:44 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy