12-21-2007
How to includes files and folder inside a folder
Hi!
I tried the procedure described and I could change the file names inside the main folder. I would like this process to include any subfolders and files included in the main folder (and not repeating it in each folder!).
Thanks!
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
i have a set of *.lst files. now i want to change the names from "lst" to "dat". how to do it?
ex.:
-rw-r--r-- 1 rram group 22 Sep 21 13:10 a.lst
-rw-r--r-- 1 rram group 22 Sep 21 13:09 b.lst
-rw-r--r-- 1 rram group 22 Sep 21 13:10 c.lst... (4 Replies)
Discussion started by: raguramtgr
4 Replies
2. UNIX for Dummies Questions & Answers
Hi All,
Today I got a small problem while handling zipped files in PROD support.
There are files in this format and I had to grep them reading some contents
A.B.gz.C.D
where A,B,C and D stand for variables (like FIRST.NAME.gz.MIDDLE.LAST).
I know that these files are zipped files and If I... (1 Reply)
Discussion started by: adurga
1 Replies
3. UNIX for Dummies Questions & Answers
directory name = /usr/tom/1997
files -
ABC_1997_ST1_BCD.SQL
BCD_1997_ST1_EFG_SAB.SQL
TTT_EBC_1997_ST1_A.SQL
sub directory - /usr/tom/1997/jan
a) I want to just rename the all files ending with '.SQL' and also its contents in the 1997 directory(excluding subdirectories eg... (3 Replies)
Discussion started by: systemsb
3 Replies
4. UNIX for Dummies Questions & Answers
I have a list of files named ab_*.csv
I would like to remane them all by removing the ab_ and have *.csv
I did the following but I am surely missing something.
/* wrong script */
for i in `ls -1 ab_*`; do mv ab_$i $i; done
Thanks in advance. (1 Reply)
Discussion started by: jxh461
1 Replies
5. Shell Programming and Scripting
Hi all,
using a utility image file was named starting with blank space and a blank space in between. I want to rename the files.
file names are in the format " sb 12.tif"," sb 13.tif"," sb 14.tif" the files are in thousands. i want to rename as 12.tif, 13.tif, 14.tif....
thanks. (3 Replies)
Discussion started by: ahkverma
3 Replies
6. Shell Programming and Scripting
Hi All
I have a folder that contains hundreds of file with a names
3.msa
4.msa
21.msa
6.msa
345.msa
456.msa
98.msa
...
...
...
I need rename each of this file by adding "core_" in the begiining of each file such as
core_3.msa
core_4.msa
core_21.msa (4 Replies)
Discussion started by: Lucky Ali
4 Replies
7. Shell Programming and Scripting
Hi,
I have a list of files in a folder with the same name ending (over 1000 files)
joe.jpy.jpeg
joe1.jpy.jpeg
joe2.jpy.jpeg
jon3.jpy.jpeg
jor5.jpy.jpeg
.....jpy.jpeg
etc.
I want to change jpy to hhk
So the output will be:
joe.hhk.jpeg
joe1.hhk.jpeg
joe2.hhk.jpeg
jon3.hhk.jpeg... (3 Replies)
Discussion started by: kylle345
3 Replies
8. Shell Programming and Scripting
Hi
i have to achieve the following
i have files as xyz001.csv, xyz002.csv.......xyz0025.csv in a folder, i need to keep xyz001.csv as it is
but want to remove the extra zero on filename from 10 say
xyz0010 should be renamed to xyz010
xyz0025 should be renamed as xyz025
Note xyz... (8 Replies)
Discussion started by: mad_man12
8 Replies
9. Shell Programming and Scripting
Hello,
I am looking for a command line that will rename name files :
f700_abc_o_t_MASTERID_AS_AE_20130323.csv
like this
f700_abc_o_t_MASTERID_AS_AE_20130324.csv
The great idea could be to get the date stamp 20130323
and change any part of it, instead of just change the... (4 Replies)
Discussion started by: Aswex
4 Replies
10. Shell Programming and Scripting
Hi,
In sftp script to get files, I have to rename all the files which I am picking. Rename command does not work here. Is there any way to do this?
I am using #!/bin/ksh
For eg: sftp user@host <<EOF
cd /path
get *.txt
rename *.txt *.txt.done
... (7 Replies)
Discussion started by: jhilmil
7 Replies
break(1) User Commands break(1)
NAME
break, continue - shell built-in functions to escape from or advance within a controlling while, for, foreach, or until loop
SYNOPSIS
sh
break [n]
continue [n]
csh
break
continue
ksh
*break [n]
*continue [n]
DESCRIPTION
sh
The break utility exits from the enclosing for or while loop, if any. If n is specified, break n levels.
The continue utility resumes the next iteration of the enclosing for or while loop. If n is specified, resume at the n-th enclosing loop.
csh
The break utility resumes execution after the end of the nearest enclosing foreach or while loop. The remaining commands on the current
line are executed. This allows multilevel breaks to be written as a list of break commands, all on one line.
The continue utility continues execution of the next iteration of the nearest enclosing while or foreach loop.
ksh
The break utility exits from the enclosed for, while, until, or select loop, if any. If n is specified, then break n levels. If n is
greater than the number of enclosing loops, the outermost enclosing loop shall be exited.
The continue utility resumes the next iteration of the enclosed for, while, until, or select loop. If n is specified then resume at the n-
th enclosed loop. If n is greater than the number of enclosing loops, the outermost enclosing loop shall be used.
On this man page, ksh(1) commands that are preceded by one or two * (asterisks) are treated specially in the following ways:
1. Variable assignment lists preceding the command remain in effect when the command completes.
2. I/O redirections are processed after variable assignments.
3. Errors cause a script that contains them to abort.
4. Words that follow a command preceded by ** that are in the format of a variable assignment are expanded with the same rules as a vari-
able assignment. This means that tilde substitution is performed after the = sign, and also that word splitting and file name genera-
tion are not performed.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
SEE ALSO
csh(1), exit(1), ksh(1), sh( 1), attributes(5)
SunOS 5.10 17 Jul 2002 break(1)