10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello All
A similar question like this was asked before but I need to change part of the question.
I've two folders, Folder A contains some image files in 150 subfolders;
Folder B contains text files in 350 subfolders.
All image files in Folder A have the same filename as the text... (5 Replies)
Discussion started by: chlade
5 Replies
2. Shell Programming and Scripting
hi,
i have a directory which contains some files and a subdirectory. i am writing only the files names to a file using the below code.
ls -ltr | grep "^-" | awk '{print $NF}' > /home/file_list$$
cat /home/file_list$$
s1_abc.txt
s2_def.xls
s3_def.xls
as you can see there is one .txt... (7 Replies)
Discussion started by: Little
7 Replies
3. Shell Programming and Scripting
I have a filename with a bunch of periods that I want to replace with underscores, but I don't want to change the extension.
Ex: I want
file.test1.f-1.fig.eps
to be
file_test1_f-1_fig.eps
Using awk, the following line will replace ALL periods with underscores, but I want to leave the... (2 Replies)
Discussion started by: erinbot
2 Replies
4. Shell Programming and Scripting
Is there an easy way to strip off a filename's extension?
For example, here's a filename:
blahblahblah.thisisok.thisisnotok
I want to get rid of .thisisnotok from the filename, so that what's left is
blahblahblah.thisisok
Thanks. I have a directory full of filenames that need to be... (5 Replies)
Discussion started by: daflore
5 Replies
5. Shell Programming and Scripting
I have a problem mounting images because of the spaces in the filenames. Does anyone know how to rename files by removing the spaces with the find command?
find Desktop/$dir -name "*.dmg" -print -exec ??? (4 Replies)
Discussion started by: ianebaj
4 Replies
6. Shell Programming and Scripting
Hi, all:
I've got two folders, folder A contains some image files (say, 100 files) in .jpg format;
folder B contains all description files (say, 500 files) in .txt format.
All image files in folder A are able to find their corresponding description files in folder B.
That is to say,... (3 Replies)
Discussion started by: jiapei100
3 Replies
7. Shell Programming and Scripting
I'm using a script with a lot of SED commands, in conjunction with grep, cut, etc. I've come up against a wall with a particular road block:
I output a file from an SVN registry that gives me a list of files. The list consists of a variable number of lines that contain a path/file. The paths... (4 Replies)
Discussion started by: Brusimm
4 Replies
8. Shell Programming and Scripting
Hi all,
I have 4 files for example named
abc01012009.txt
abc02012009.txt
abc03012009.txt
abc04012009.txt
in a folder. I would like to firstly backup the latest file available, in this case, the latest date available, abc04012009.txt to its subfolder named backup, and then rename the... (4 Replies)
Discussion started by: tententen
4 Replies
9. Shell Programming and Scripting
Hi,
I want to write a script to read all the filenames with extension .xml in a directory and pass the name of the file, one by one, to another function.
Please help me out.
Regards.
Saurabh (3 Replies)
Discussion started by: bhalotias
3 Replies
10. UNIX for Dummies Questions & Answers
Hi -
I'm stuck. I have a group of text files created using the split command. My files have the names "projectaa", "projectab", "projectac", etc. What I want to do is add the extension ".txt" to each file. I think I've got part of a sed command together, but I'm stuck on my regex - I keep getting... (9 Replies)
Discussion started by: pepintheshort
9 Replies