Sponsored Content
Top Forums Shell Programming and Scripting trying to rename the files in dir Post 302124634 by hankooknara on Monday 2nd of July 2007 03:07:13 AM
Old 07-02-2007
rock on guys.. thanks.. I used cautionary measure and it's all working.. now working on next fix..

E41.You.Landscape.kor.hdtv.original.avi

trying to put below files into different names so that
it will look like----> Love.Or.war.E388.avi

Everyone has different name, so I did below but do not work...

Code:
#!/bin/sh
ls |
    egrep "^E[1-9][0-9][0-9]*\." |
     while read a
      do
         yahoo=`echo $a |sed '/\(E[^.]\)\.\([^(kor|hdtv|sdtv|avi)]\)[^(.avi)]\(\.avi\)/\2\1\3/gi'`
         echo $yahoo
         mv "$a" "$yahoo"
done

E388.Love.Or.War.kor.hdtv.avi
E389.Love.Or.War.kor.hdtv.avi
E38.Lovely.Goodday.kor.hdtv.avi
E38.The.Happy.Woman.kor.sdtv.avi
E38.You.Landscape.kor.hdtv.avi
E39.The.Happy.Woman.kor.sdtv.avi
E39.You.Landscape.kor.hdtv.avi
E40.The.Happy.Woman.kor.sdtv.avi
E41.The.Happy.Woman.kor.sdtv.avi
E42.Lovely.Goodday.kor.hdtv.avi
E42.The.Happy.Woman.kor.sdtv.avi
E43.Lovely.Goodday.kor.hdtv.avi
E43.The.Happy.Woman.kor.sdtv.avi
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to copy specified files from list of files from dir A to dir B

Hello, fjalkdsjfkldsajflkajdskl (3 Replies)
Discussion started by: pmeesara
3 Replies

2. Windows & DOS: Issues & Discussions

DOS script to grab the first file in a dir and rename it

:confused: Hello, Is there any way to use the dir command / some DOS Script to select only first file of similar pattern of files in a direcotory and rename it for example, one directory has 5 files abc_1005.txt abc_5256.txt abc_2001.txt abc_2003.txt abc_3006.txt by use script I would... (2 Replies)
Discussion started by: raghav525
2 Replies

3. Shell Programming and Scripting

Rename a file after the name of its parent dir

Started a thread in beginners but I thought someone from this forum may have an idea as well. Thanks! EDITED BY REBORG (3 Replies)
Discussion started by: robotsbite
3 Replies

4. Shell Programming and Scripting

A script to find dir, delete files in, and then del dir?

Hello!! I have directories from 2008, with files in them. I want to create a script that will find the directoried from 2008 (example directory: drwxr-xr-x 2 isplan users 1024 Nov 21 2008 FILES_112108), delete the files within those directories and then delete the directories... (3 Replies)
Discussion started by: bigben1220
3 Replies

5. Shell Programming and Scripting

moving files from a dir in one machine to a dir in another machines

Hi, I am a unix newbie.I need to write a shell script to move my oracle READ WRITE datafiles from one serevr to another. I need to move it from /u01/oradata/W1KK/.. to /u01/oradata/W2KK, /u02/oradata/W1KK/.. to /u02/oradata/W2KK. That is, I actaully am moving my datafiles from one database to... (2 Replies)
Discussion started by: mathews
2 Replies

6. UNIX for Dummies Questions & Answers

How to list all files in dir and sub-dir's recursively along with file size?

I am very new to unix as well as shell scripting. I have to write a script for the following requirement. In have to list all the files in directory and its sub directories along with file path and size of the file Please help me in this regard and many thanks in advance. (3 Replies)
Discussion started by: nmakkena
3 Replies

7. Shell Programming and Scripting

KSH - Find paths of multiple files in CC (dir and sub-dir))

Dear Members, I have a list of xml files like abc.xml.table prq.xml.table ... .. . in a txt file. Now I have to search the file(s) in all directories and sub-directories and print the full path of file in a output txt file. Please help me with the script or command to do so. ... (11 Replies)
Discussion started by: Yoodit
11 Replies

8. Shell Programming and Scripting

Script to move all files in a dir into a certain dir

Hello all, I'm very new to shell scripting and need quite urgently to do this thing for my student job. I have a directory called "vectors" with a bunch of files all named ".vector". also i have for each of those files a directory with the name . I now want to move each of those *.vector files... (2 Replies)
Discussion started by: sherresh
2 Replies

9. Shell Programming and Scripting

Loop through the dir and Rename zip files and their underlying text file.

I have files in the ABC_YYYYMMDD.zip format under a directory. Each zip file contains A text file in the ABC_YYYYMMDD.txt format. I am trying to create a script that will Rename the zip files and their underlying text file replacing the datepart in them with . For eg: in the case of... (1 Reply)
Discussion started by: bash987
1 Replies

10. AIX

Assign read write permission to the user for specific dir and it's sub dir and files in AIX

I have searched this quite a long time but couldn't find the right method for me to use. I need to assign read write permission to the user for specific directories and it's sub directories and files. I do not want to use ACL. I do not want to assign user the same group of that directories too.... (0 Replies)
Discussion started by: blinkingdan
0 Replies
yuvkineco(1)							MJPEG tools manual						      yuvkineco(1)

NAME
yuvkineco - revert 2-3 pulldown movie SYNOPSIS
yuvkineco [options] [-C PATH] yuvkineco [options] -O|N PATH DESCRIPTION
yuvkineco reverts to original non-interlaced frames, from NTSC video which was film sourced and 2-3 pulled down. Input fps code must be 4(29.97fps), output fps code can be selected from 1(23.97fps) to 4(29.97fps). If 2, 3 or 4 selected, duplicated frames remain but they are reverted to non-interlaced. If input was non-interlaced only remove duplicate frames. Interlaced frame detection may fail in conditions like: Pull down cycle changed (video editing). Low quality pull down. Motionless scene. If -C PATH was specified, yuvkineco outputs 2-3 pull down cycle list to the file. You can edit this file by hand and feed it to yuvkineco with -O or -N option to correct mistake of 1st yuvkineco. Try -C and see cycle list. EXAMPLE #1: for 24p movie / automatically lav2yuv 60i.eli | yuvkineco -F 1 | yuv2lav -f a -I 0 -o 24p.avi EXAMPLE #2: for 30p/24p mix / automatically lav2yuv 60i.eli | yuvkineco -F 4 | yuv2lav -f a -I 0 -o 30p.avi EXAMPLE #3: for 24p movie / check and repair lav2yuv 60i.eli | yuvkineco -F 1 -C 60i.23c | yuv2lav -f a -I 1 -o take1.avi glav -F +n take1.avi # check and edit 60i.23c lav2yuv take1.avi | yuvkineco -F 1 -N 60i.23c | yuv2lav -f a -I 0 -o take2.avi EXAMPLE #4: for 24p movie / check and retry lav2yuv 60i.eli | yuvkineco -F 1 -C 60i.23c | yuv2lav -f a -I 0 -o take1.avi glav -F +n take1.avi # check and edit 60i.23c lav2yuv 60i.eli | yuvkineco -F 1 -O 60i.23c | yuv2lav -f a -I 0 -o take2.avi OPTIONS
yuvkineco accepts the following options: -F FPSCODE Set output fps code (default: same as input). -C PATH Specify 2-3 pull down cycle list file name to write. -O PATH Specify cycle list name to read with old yuv stream to retry. -N PATH Specify cycle list name to read with new yuv stream to repair. -S MIN Use yuvycsnoise(1) as preprocessor and specify minimum threshold. -n LEVEL Specify noise level of input (default: 10). This affects both pulldown cycle detection and deinterlacing. -c THRESHOLD Specify threshold to decide pictures in 2 frames are same (default: 4). yuvkineco compares several frames, searches pair of frame they contain same pictures, to decide which frame should be dropped. If THRESHOLD is 0, pair which has smallest difference will be selected. If 16, selected from pairs those have differences smaller than average. -i PERMIL yuvkineco deinterlaces each frame after 2-3 pulldown reverting process, specify how much pixels deinterlaced to decide to use or not use deinterlacing result (default: 10). If PERMIL is 10 and 1% or more of pixels deinterlaced, deinterlacing result will be used. If 0, always deinterlacing result will be used. If 1000, deinterlacing result will not be used, but deinterlacing process will run on all of frames. To disable deinterlacing process, specify negative value. -u Set interlace information in header of output to unknown (default: non-interlaced). AUTHOR
yuvkineco was written by Kawamata/Hitoshi. If you have questions, remarks, problems or you just want to contact the developers, the main mailing list for the MJPEG-tools is: mjpeg-users@lists.sourceforge.net For more info, see our website at http://mjpeg.sourceforge.net/ SEE ALSO
mjpegtools(1), yuvycsnoise(1). MJPEG Linux Square 5 February 2002 yuvkineco(1)
All times are GMT -4. The time now is 11:02 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy