Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Multiple Files Renaming with space Post 302137214 by nazri76 on Sunday 23rd of September 2007 08:58:18 PM
Old 09-23-2007
i got syntax error at line 2: `$' unexpected. Could you help me?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Renaming multiple files

Help! I was trying to rename multiple files. Like in DOS, i decided to use wildcards and now i am missing some files. Any ideas on how to recover them? Or find out where the files went? I had these 3 files resume1.log elecresume.log compresume.log The command I ran was mv *.log *.log.bak... (6 Replies)
Discussion started by: rmayur
6 Replies

2. UNIX for Dummies Questions & Answers

Renaming Multiple files

Hi All my dear friends I had multiple files in my directory with .pcv and .sqv extn I want to rename all .pcv files with .pc extn and all .sqv files with .sql extn Please help me out.:eek::mad::rolleyes: e.g. /trimsbld/users/dhirens/scripts/newfolder==>ll -rt total 2856 -rwxr-xr-x 1... (2 Replies)
Discussion started by: dhiren_shah
2 Replies

3. Shell Programming and Scripting

Renaming multiple files

I have a bunch of files txt1.csv--2008 thru to txt3.csv--2008. If i wanted to rename these files all at the same time to txt*.csv-2008 what would be the best way to do it... Just need to get rid of the extra - in each file name.. not all files are going to be called txt*.csv--2008. Just... (6 Replies)
Discussion started by: Jazmania
6 Replies

4. Shell Programming and Scripting

Renaming multiple files

Hi, I have several hundred files I need to rename, and I'm would rather not hit F2 for each file individually to rename them. Example of file: large1961.jpg What I need the file to be renamed as: 1961.jpg I don't know what type of command I can execute within a shell script that would... (7 Replies)
Discussion started by: jayell
7 Replies

5. Shell Programming and Scripting

renaming multiple files

I have to rename 100+ files at a time on the server & was trying to use a script for doing that. I have used ultra edit to create a file having current filename & new file name as below file234.txt | file956.txt file687.txt | file385.txt There is no fixed pattern while renaming & would... (20 Replies)
Discussion started by: crux123
20 Replies

6. UNIX for Dummies Questions & Answers

Renaming multiple files

I have multiple gif files in a directory with different names. How can i rename them to have this result: file01.gif file02.gif file03.gif . . . file0500.gif Thanks for your help. (3 Replies)
Discussion started by: netx
3 Replies

7. UNIX for Dummies Questions & Answers

Renaming multiple files

Hi, Can we rename multiples files using find or awk utility? Now I am doing it using for loop and getting the file name and in side the loop using the mv command. Like ine need t rename all txt files to doc file. For example a1.txt => a1.doc a2.txt => a2.doc a3.txt => a3.doc myfile.txt... (2 Replies)
Discussion started by: siba.s.nayak
2 Replies

8. Shell Programming and Scripting

Converting space to newlines and renaming files

Hi All, I have this code which has two problems: find . -name '*.fil' | xargs while read page do cat $page | awk '{for(i=1;i<=NF;i++) print $i}' $page>$page.txt done find . -name '*.fil.txt' | xargs rename '.fil.txt' .fil 1. I am running this code in a directory consisting of large... (1 Reply)
Discussion started by: shoaibjameel123
1 Replies

9. UNIX for Dummies Questions & Answers

Renaming Multiple files

Hello, I have multiple files that I want to change the names to. Let's say for example that I want to rename all the files in the left column to the names in the right column: What would be the easiest way to go about doing this? Thanks. (1 Reply)
Discussion started by: Scatterbrain26
1 Replies

10. Shell Programming and Scripting

Renaming multiple files in sftp server in a get files script

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
Test::Assertions::TestScript(3pm)			User Contributed Perl Documentation			 Test::Assertions::TestScript(3pm)

NAME
Test::Assertions::TestScript - Base for test scripts SYNOPSIS
use Test::Assertions::TestScript; use Module::To::Test qw( frobnicate ); ASSERT(frobnicate(),"Frobnicate returns true"); DESCRIPTION
Test::Assertions::TestScript provides a base for writing test scripts. It performs some common actions such as setting up the @INC path and parsing command-line options, specifically: o The lib and t/lib directories are added to @INC. o The current directory is changed to the directory the script is in. o Test script command-line options are parsed. (See "COMMAND-LINE OPTIONS") o The test set of functions from Test::Assertions are imported into your test script. Test::Assertions::TestScript makes certain assumptions about the filesystem layout of your project: o Modules that you are testing are in the lib directory of your project. o Test scripts are in the t directory. o There may also be a t/lib directory for any modules written for the test process. Test::Assertions::TestScript should be "use"d before any modules that you intend to test. OPTIONS
Options can be supplied to the import function. These should be placed after the "use" or "import". For example use Test::Assertions::TestScript( tests => 10, options => { 'b', $opt_b }) The following options are defined: tests The number of tests to pass to "plan tests" from Test::Assertions. For example to tell Test::Assertions::TestScript that the script contains 42 tests: use Test::Assertions::TestScript tests => 42; options A hashref of additional options to capture via Getopt::Long. The "options" import parameter is passed verbatim to GetOptions, so something along the following lines is required in order to capture the "-b" command line option: use Test::Assertions::TestScript( options => { 'b' => $opt_b } ); COMMAND-LINE OPTIONS A script based on Test::Assertions::TestScript will detect the following command line options. -t Shallow tracing. Traces are "print"ed and AutoImport is turned on. -T Deep tracing. Traces are "print"ed and AutoImport is turned on. --trace-module=MODULE Imports tracing into MODULE specifically. Can be specified multiple times. -s Save generated output. You will need to write the actual code to do this in your testscript, but you can inspect $Test::Assertions::TestScript::SAVE_OUTPUT to see whether this argument was given. Be aware that all other command line options will be disregarded unless the "options" import parameter is used to capture them. VERSION
$Revision: 1.18 $ AUTHOR
Colin Robertson <cpan _at_ bbc _dot_ co _dot_ uk> COPYRIGHT
(c) BBC 2005-6. This program is free software; you can redistribute it and/or modify it under the GNU GPL. See the file COPYING in this distribution, or http://www.gnu.org/licenses/gpl.txt perl v5.10.0 2006-08-10 Test::Assertions::TestScript(3pm)
All times are GMT -4. The time now is 01:34 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy