Sponsored Content
Full Discussion: Renaming the File in UNIX
Top Forums UNIX for Dummies Questions & Answers Renaming the File in UNIX Post 302226524 by Franklin52 on Tuesday 19th of August 2008 07:04:06 AM
Old 08-19-2008
This gives the commands to remove those files:

Code:
ls *.F1.test | sed 's/\(.*\)\.F1\.Test/mv & \1.csv/'

If the output is correct you can pipe the output to sh.


Regards
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Utility or script for renaming files on UNIX web server

Greetings! Does anyone know of a utility or a script for renaming files on a UNIX web server? I've seen several of these types of renaming utilities for Windows, but none for UNIX. I have 10,000 files that I need to rename in a several tier (deep) web site directory. I have the original... (1 Reply)
Discussion started by: everettr
1 Replies

2. Shell Programming and Scripting

Utility or script for renaming files on UNIX web server

Greetings! Does anyone know of a utility or a script for renaming files on a UNIX web server? I've seen several of these types of renaming utilities for Windows, but none for UNIX. I have 10,000 files that I need to rename in a several tier (deep) web site directory. I have the original... (2 Replies)
Discussion started by: everettr
2 Replies

3. Shell Programming and Scripting

Renaming a file use another file as a sequence calling a shl

have this shl that will FTP a file from the a directory in windows to UNIX, It get the name of the file stored in this variable $UpLoadFileName then put in the local directory LocalDir="${MPATH}/xxxxx/dat_files" that part seems to be working, but then I need to take that file and rename, I am using... (3 Replies)
Discussion started by: rechever
3 Replies

4. Shell Programming and Scripting

File renaming from list of names contained in another file

I have to rename a large number of files so that the name of each file corresponds to a code number that is given side by side in a list (textfile). The list contains in column A the filename of the actual files to be renamed and in column B the name (a client code, 9 digits) that has to be... (7 Replies)
Discussion started by: netfreighter
7 Replies

5. UNIX for Dummies Questions & Answers

Renaming a file (non unix person)

I am trying to move a file to a new file with a datestamp in the filename on a unix server using a script I am trying to write. I have searched this forum and have tried 100 different variations but cannot solve my problem. My requirement is: Rename archiveSF\sfglsoarian.txt to... (3 Replies)
Discussion started by: cavleader
3 Replies

6. OS X (Apple)

Renaming serial ports in unix

Hello everyone, this is my first post and I am by no means a unix expert, so I hope I explain my issue well. I'm on a mac (mac mini), 10.7. My question is about serial port names. I have an arduino microcontroller plugged in via usb, and every time the computer is shut down it gives the... (0 Replies)
Discussion started by: superliminal
0 Replies

7. Shell Programming and Scripting

Remote renaming of a unix file via ftp

Hi all, i'm just after some help regarding a batch script. I'm wanting to create a windows batch script which will push a file from my pc to a unix (AIX) system via ftp. i have this part working fine but as the file i'm sending already exists i want the script to also take a sideways copy of... (6 Replies)
Discussion started by: forefather1977
6 Replies

8. UNIX for Dummies Questions & Answers

[Solved] Renaming Multiple Files in Unix

I have mulitiple files in a unix directory e.g. FILE10001.txt FILE10002.txt I want the above two files to get renamed as by a single command. I tried with mv but it does not work FILE20001.txt FILE20002.txt Paresh (6 Replies)
Discussion started by: Pash
6 Replies

9. Shell Programming and Scripting

Renaming file and check for the renamed file existence

Hi Am trying to move a file from one name to another When I do "ls" to check for the moved filename I can see the file but when I try the same with a script am unable.. I think am doing some pretty silly error.. please help.. toMove=`ls | grep -E "partition.+"` mv $toMove partition._org... (7 Replies)
Discussion started by: Priya Amaresh
7 Replies

10. Shell Programming and Scripting

UNIX :renaming the files present in the directory

Hi all, I am looking for a script which renames all the files from the present directory. Eg.: In unix directory contains the below files linux001.txt linux002.txt linux003.txt ...... ....... Now the files should be renamed to unix001.txt unix002.txt unix003.txt Could anyone... (8 Replies)
Discussion started by: scriptscript
8 Replies
Test::Harness::Straps(3pm)				 Perl Programmers Reference Guide				Test::Harness::Straps(3pm)

NAME
Test::Harness::Straps - detailed analysis of test results SYNOPSIS
use Test::Harness::Straps; my $strap = Test::Harness::Straps->new; # Various ways to interpret a test my %results = $strap->analyze($name, @test_output); my %results = $strap->analyze_fh($name, $test_filehandle); my %results = $strap->analyze_file($test_file); # UNIMPLEMENTED my %total = $strap->total_results; # Altering the behavior of the strap UNIMPLEMENTED my $verbose_output = $strap->dump_verbose(); $strap->dump_verbose_fh($output_filehandle); DESCRIPTION
THIS IS ALPHA SOFTWARE in that the interface is subject to change in incompatible ways. It is otherwise stable. Test::Harness is limited to printing out its results. This makes analysis of the test results difficult for anything but a human. To make it easier for programs to work with test results, we provide Test::Harness::Straps. Instead of printing the results, straps provide them as raw data. You can also configure how the tests are to be run. The interface is currently incomplete. Please contact the author if you'd like a feature added or something change or just have comments. Construction new my $strap = Test::Harness::Straps->new; Initialize a new strap. Analysis analyze my %results = $strap->analyze($name, @test_output); Analyzes the output of a single test, assigning it the given $name for use in the total report. Returns the %results of the test. See Results. @test_output should be the raw output from the test, including newlines. analyze_fh my %results = $strap->analyze_fh($name, $test_filehandle); Like "analyze", but it reads from the given filehandle. analyze_file my %results = $strap->analyze_file($test_file); Like "analyze", but it runs the given $test_file and parses it's results. It will also use that name for the total report. Results The %results returned from analyze() contain the following information: passing true if the whole test is considered a pass (or skipped), false if its a failure exit the exit code of the test run, if from a file wait the wait code of the test run, if from a file max total tests which should have been run seen total tests actually seen skip_all if the whole test was skipped, this will contain the reason. ok number of tests which passed (including todo and skips) todo number of todo tests seen bonus number of todo tests which unexpectedly passed skip number of tests skipped So a successful test should have max == seen == ok. There is one final item, the details. details an array ref reporting the result of each test looks like this: $results{details}[$test_num - 1] = { ok => is the test considered ok? actual_ok => did it literally say 'ok'? name => name of the test (if any) type => 'skip' or 'todo' (if any) reason => reason for the above (if any) }; Element 0 of the details is test #1. I tried it with element 1 being #1 and 0 being empty, this is less awkward. EXAMPLES
See examples/mini_harness.plx for an example of use. AUTHOR
Michael G Schwern <schwern@pobox.com> SEE ALSO
Test::Harness perl v5.8.0 2002-06-01 Test::Harness::Straps(3pm)
All times are GMT -4. The time now is 06:34 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy