07-10-2010
Quote:
Originally Posted by
KenJackson
In the past, people advocated against using ls that way
I simply use what I consider most transparent in terms of readability / maintainability (- if it were about efficiency, I'd code in C ...
).
9 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
Hi All
We have hp-ux 11iv1 system running with oracle8i database.
We have around 350,000 users, each user uploaded their own signatures and are stored in unix filesystems department wise.
A database is maintained to keep their particulars with a path to link their signature files.
Now... (3 Replies)
Discussion started by: mhbd
3 Replies
4. UNIX for Dummies Questions & Answers
Hi Alll,
I have a script that we use on the servers to change the name of files that have spaces in the name:
#!/bin/tcsh
set n = 0
foreach f ( * )
echo $f | grep " "
if ( $? == 0 ) then
mv "$f" `echo $f | sed -e "s/ /_/g"`
@ n += 1
endif
end
echo $n changed
I need to write a... (2 Replies)
Discussion started by: abch624
2 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 guys and girls,
i have a folder containing RAW and JPG images. eg...
001.jpg
003.jpg
005.jpg
001.raw
002.raw
003.raw
004.raw
005.raw
I want to copy only RAW files that have a corresponding JPG file in to a new folder. the jpg files do not need to be copied.
in this example i... (6 Replies)
Discussion started by: fxylxy
6 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
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