rename file by adding a name in beginning


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers rename file by adding a name in beginning
# 1  
Old 11-11-2011
rename file by adding a name in beginning

about 200 files with names as
11_0.pdb
11_60.pdb
12_12.pdb
14_180.pdb

are there in my library...I need to rename all of them by addinf File in front of them as:

File11_0.pdb
File11_60.pdb
File12_12.pdb
File14_180.pdb

I checked many threads but it seems i get even more confused..i have to do this for my project today and iam certainly very bad at linux,....Any help is warmly welcomed.....Smilie
# 2  
Old 11-11-2011
This User Gave Thanks to jayan_jay For This Post:
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Adding to an array in an external file, and adding elements to it.

I have an array in an external file, "array.txt", which contains: char *testarray={"Zero", "One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine"};I want to be able to add an element to this array, and have that element display, whenever I call it, without having to recompile... (29 Replies)
Discussion started by: ignatius
29 Replies

2. Shell Programming and Scripting

Adding test to beginning and end of list in a file

Hi all and apologies for the silly question, but I've searched and I can't get this right. I have a list of email addresses in a file that I need to blacklist (spam). the list is quite long and I would need to script a small routine so that I can get the following for each line in the file: db... (4 Replies)
Discussion started by: bm555
4 Replies

3. Shell Programming and Scripting

Adding a text in the beginning of a line

Hi, I am doing something like below: cat file1>file3and cat file2>>file3 I wanted to check if there is a way to write a custom message(hardcoded message)something like below at the beginning of each line then PIPE delimitiation and then followed by remaining record. cat file1... (7 Replies)
Discussion started by: Saanvi1
7 Replies

4. Shell Programming and Scripting

renaming files or adding a name in the beginning of all files in a folder

Hi All I have a folder that contains hundreds of file with a names 3.msa 4.msa 21.msa 6.msa 345.msa 456.msa 98.msa ... ... ... I need rename each of this file by adding "core_" in the begiining of each file such as core_3.msa core_4.msa core_21.msa (4 Replies)
Discussion started by: Lucky Ali
4 Replies

5. Linux

Add file's date at beginning of every line in file

How would I do that? /Rutger (6 Replies)
Discussion started by: rutgerblom
6 Replies

6. Shell Programming and Scripting

Adding new lines to a file + adding suffix to a pattern

I need some help with adding lines to file and substitute a pattern. Ok I have a file: #cat names.txt name: John Doe stationed: 1 name: Michael Sweets stationed: 41 . . . And would like to change it to: name: John Doe employed permanently stationed: 1-office (7 Replies)
Discussion started by: hemo21
7 Replies

7. UNIX for Dummies Questions & Answers

Appending at the beginning of the file.

Hi, I am using ">>" to append to the existing file but I appens to the end of the file but I want to add tne new things at the beginning. Do we have any functionality to do that? Thanks, Siba (1 Reply)
Discussion started by: siba.s.nayak
1 Replies

8. UNIX for Dummies Questions & Answers

Adding one string at the beginning of each line in a file

Hi, I have file a.txt as below. I want to add one string root beginning of each line. Sample file a.txt aaa bbb ccc Sample output Root aaa Root bbb Root ccc Can any one help me on this? (6 Replies)
Discussion started by: siba.s.nayak
6 Replies

9. Shell Programming and Scripting

Adding words to beginning of lines

I have a file that contains a great number of lines, let's say 183 lines, and I want to add: echo " to the beginning of each line. What is the easiest way to do it? Tx (9 Replies)
Discussion started by: Ernst
9 Replies

10. Shell Programming and Scripting

Adding a character in the beginning of every line in a .dat file

How can i add a character(#) in the beginning of every line in a .dat file (2 Replies)
Discussion started by: Cool Coder
2 Replies
Login or Register to Ask a Question