I have created a script to rename all files in a directory by appending the file name with username (who created the file), the date it was created. For example, "apple.doc" should be renamed to "johnFeb23apple.doc" where "john" is the owner and "Feb23" is file created date. It works fine with file names without spaces. but there are few issues I don't know how to fix.
First, Here's my script:
1. When it met a file with spaces, e.g. like "fff eee.xls" it gives the following error and won't rename that file:
2. I need to run this script in the parent directory (it's sub directory contains all files to be renamed). How do I make that change in my script? (adding path of sub directory where all files stored)
script is in "/tommy/" directory and files in "/tommy/data/" directory
Please help me. Thanks in advance...
Last edited by DukeNuke2; 02-24-2012 at 03:00 PM..
I'm working on a project that basically unzips three zip files.
When these unzip they create about 70+ directories with subdirectories of year/month with about 3 to 9 pdf files in each directory.
Basically, I'm needing to figure out a way to zip these pdf files up.
for instance the script... (1 Reply)
System: Ubuntu Intrepid Ibex
I'm running webcamd as a sort of "security" program, but I need a script that will archive my webcam.jpg files.
So, take the following file:
/home/slag/www/webcam.jpg
Rename it--preferably with a time stamp.
Place it in say:
/home/slag/www/history/
... (4 Replies)
Hi,
I have around 100 xml file in a directory. I need to rename the files from .xml to .xml1. So i tried using the following command:
mv *.xml *.xml1
but i am getting the following error
mv: when moving multiple files, last argument must be a directory
Try `mv --help' for more... (8 Replies)
Hi.
I don't have any experience with making scripts in bash. I need a simple script to rename all files in a folder to the format file1.avi, file2.avi, file3.avi, and so on.....
Please note that the original files have different filenames and different extensions. But they all need to be... (2 Replies)
I just can't figure it out , so please just give me a pice of advise how to:
The existing Linux program foo2bar takes as its only argument the name of a single foo file and converts it to an appropriately-named bar file. Provide a script that when executed will run foo2bar against all foo... (4 Replies)
:wall::wall::wall:
Hi I have horrible script below, need help in renaming ls -l output into new filename format:
Desired output:
cp -pv original_path/.* newDirectory/owner_of_file.%dd%mm%y.file_extension.first_8_characters_of_original_filename
localuser@localuser:~ vi... (3 Replies)
Our Apache log files are written to a location on the server that we as clients have no access. Don't ask.
Every month, I have to e-mail the administrator to have him manually copy our Apache log files to a directory in our file space. You can probably guess how efficient it is to do things this... (3 Replies)
In the below bash processes substitution, if there are 3 files in a directory /home/cmccabe/medex.logs/analysis.log, the filename variable is set to where these files are located.
The code does execute, the problem is that if there is a renamed file in the output directory below, it gets... (0 Replies)
I'm trying to write a script in a directory that goes through the column the user specifies of 4 files that are inside the directory and calculates the min and the max values. This means that if the user specifies column 5, the script will go through column 5 of all 4 files and all that should give... (2 Replies)
Discussion started by: Eric1
2 Replies
LEARN ABOUT DEBIAN
openscad-testrun
OPENSCAD-TESTRUN(1) General Commands Manual OPENSCAD-TESTRUN(1)NAME
openscad-testrun - set up and run the OpenSCAD test suite
SYNOPSIS
openscad-testrun [options]
DESCRIPTION
This manual page documents briefly the openscad-testrun command.
openscad-testrun is a script that sets up a directory in which the OpenSCAD test suite (implemented in ctest) can be run by creating sym-
links to the system locations of the input data, and runs it. The created directory is not removed, but will contain the test results in
addition to the symlinks.
It is required as the test suite in its original form expects all the test input and output data in relative locations, and the typical
user has no write access to where the data resides. Future changes to the test suite might make it more flexible, removing the need for
this script.
OPTIONS -d directory, --directory directory
Set up the tests in a directory called directory. By default, this is generated from the current date and time like openscad-
test-2012-02-15_13:37.
-n, --dry-run
Do not run the test suite, just set it up.
All additional arguments are passed on to ctest.
AUTHOR
The OpenSCAD test suite was written by Clifford Wolf, Marius Kintel, and others. The openscad-testrun script was written by chrysn.
This manual page was written by chrysn <chrysn@fsfe.org>, for the Debian project (and may be used by others).
2012-02-16 OPENSCAD-TESTRUN(1)