Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Changing cases of multiple files in different folders Post 302923412 by bpmawhin on Sunday 2nd of November 2014 06:18:44 PM
Old 11-02-2014
Changing cases of multiple files in different folders

I am a TA for a computer science course and we have a program that flags code that appears to the same as other code that is supplied. In order for the program to check all of the student's programs, the programs all need to be named exactly the same. However, students don't like to follow directions in naming programs.
For example, our students should be naming exam files "exam.f95"
but they sometimes name them "Exam.f95" or "EXAM.f95".
I need to rename all their files to match the correct format, but the files are all in different directories.
I am writing a .sh script to rename the files and run the program. In my script

Code:
find $download_dir -iname "$filename" | tr '[:upper:]' '[:lower:]'

displays the files with the correct name, but does not actually save them as the correct name. how do I go about actually saving the files with the correct name?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Find and replace files in multiple folders

Hi there, I would like to write a script to automate the copy and renaming of files in multiple dir. I have a generic file named s253e.prb and would like to copy this to multiple dir and rename it. Example: Dir is AL-M1 and the prb file name is AL-M1.prb. I would like to be able to... (6 Replies)
Discussion started by: lodey
6 Replies

2. Shell Programming and Scripting

moving multiple folders/files in subversion using bash script

Hi, I'm new here an dlearning a lot from this forum. i didnt find any solution for this in the forum. I have already checked in folders in subversion named HTT01,... HTT21.. and have files in each folder like below: HTT01/HTT01_00000.hex HTT01/HTT01_00000_fb_result.hex... (2 Replies)
Discussion started by: ravishan21
2 Replies

3. UNIX for Dummies Questions & Answers

changing extensions for multiple files at once

I copied some files to another folder, and I want to change them from .doc extensions to .txt extensions. I tried using the cp and mv commands, but it didn't work. Is it possible to change file extensions with these commands, and if so how do I do it? I tried using the * wildcard (say cp *.doc... (1 Reply)
Discussion started by: Straitsfan
1 Replies

4. UNIX for Dummies Questions & Answers

mv folders/files without changing modified date?

Hi all, I'm using Red Hat Linux and want to move some folders and files around but not change the modified date. Is this possible? I know cp has a -p flag which seems to do what I want, but this is a large volume of data so copying and deleting would not be feasible. (13 Replies)
Discussion started by: Annorax
13 Replies

5. UNIX for Dummies Questions & Answers

Rename files to indexnumber in multiple folders

I have multiple subfolders with multiple jpg I want the group of files in each subfolder renamed to their index number (3 digits) in the folder, so: folder/a.jpg = folder/001.jpg folder/b.jpg = folder/002.jpg folder/c.jpg = folder/003.jpg folder2/1.jpg = folder2/001.jpg folder2/2.jpg =... (2 Replies)
Discussion started by: cmanniche
2 Replies

6. Shell Programming and Scripting

Find files of type within folder copy multiple results to different folders

Ok question number two: I'd like to search a directory for multiple file types (rar, txt, deb) and depending on what's found, copy those files to folders named Rar, TextFiles, and Debs. I'm looking for speed here so the faster the script the better. I want it to be a function that I pass 1 argument... (4 Replies)
Discussion started by: DC Slick
4 Replies

7. Shell Programming and Scripting

Shell Script to delete files within a particular time frame under multiple sub folders

Greetings! I'm looking for starting information for a shell script. Here's my scenario: I have multiple folders(100) for example: /www/test/applications/app1/logs /www/test/applications/app2/logs Within these folders there are log files files that need to be deleted after a month. ... (3 Replies)
Discussion started by: whysolucky
3 Replies

8. Shell Programming and Scripting

Script to move files in multiple folders

Hello all, I would appreciate any help to write a script. I have folder A which contains over 30 thousands xml files, I would like create multiple folders and move those files (500 in each folders). Thank you (1 Reply)
Discussion started by: mmsiddig
1 Replies

9. UNIX for Dummies Questions & Answers

Unzipping a file which has multiple folders and each folder has the files with same name in it

Hi, I have a zipped file a.zip. This has got multiple folders in it say x and y. x contains a.txt and y contains a.txt. Is it possible to unzip this file and have the 2 files extracted and rename them to unique names. Thanks in advance. (1 Reply)
Discussion started by: arunkesi
1 Replies

10. Shell Programming and Scripting

Execute multiple files in multiple folders and also output on same folder

How to execute multiple files in multiple folders and also output to be generated in the same folder? Hello Team, I have a path like Sanity_test/*/* and it has around 100+ folders inside with files. I would like to run/execute those files and output of execution to be placed on same /... (1 Reply)
Discussion started by: pushpabuzz
1 Replies
nccgen(1)							      nccgen								 nccgen(1)

NAME
nccgen - source code analysis SYNOPSIS
nccgen file.c DESCRIPTION
nccgen is a program that can help you hack/study the source code of C programs. It will report which functions call which other functions, which functions are called by other functions and what global variables and members of structures are used by functions. This is useful if you want to analyse a program and eventually hack it. USAGE
To use nccgen find the Makefile of the program you want to analyse. In the Makefile locate the line which sets the C compiler. That is usually something like CC = gcc and you must change it to CC = nccgen -ncgcc -ncld -ncfabs. Then compile the application. It may be useful to also replace AR = ar with AR = nccar and LD = ld with LD = nccld to link nccout object files. OUTPUT
nccgen will produce a file with nccout extension for every C file analysed. Then you can use the viewer nccnav (with nccnav program.nccout ) to view this data and do your work. If the procedure of make links object files with "ar" or "ld" you should manually link the produced .nccout files. AUTHORS
The homepage of the ncc project is: http://students.ceid.upatras.gr/~sxanth/ncc/ SEE ALSO
The documentation included in the package. Linux 8 Mar 2003 nccgen(1)
All times are GMT -4. The time now is 03:39 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy