10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
Having many filenames in a folder containing the string "-DATE" (e.g. : Nbr_Name-DATE_2011.txt). I would like to remove the "-DATE" in each filename to get just: Nbr_Name_2011.txt . Know its easy but somehow it wont work. Tried it like that:
for i in `ls *-DATE*`; do mv "$i"... (10 Replies)
Discussion started by: jurgen
10 Replies
2. UNIX for Dummies Questions & Answers
Hi
I remember i have create a file "Dechistory" before a month. But i dont remember exact location.
I know i need to find out first that fiiles exact location for renaming it .......but i waant to that without going on that location.......how to do that ??? (1 Reply)
Discussion started by: tusharjoshi
1 Replies
3. UNIX for Dummies Questions & Answers
I have 7 files with 7 different names coming into a specified folder on weekly basis, i need to pick a file one after another and load into oracle table using sql loader. I am using ksh to do this. So in the process if the file has error records and if sql loader fails to load into oracle tables,... (0 Replies)
Discussion started by: vpv0002
0 Replies
4. Shell Programming and Scripting
I am a complete Unix newbie and I need some help! (Please...)
I need to rename a file from the following format:
Test_Test_EAR_1234.ear
To the following:
Test_Test_EAR.ear
In other words, I need to remove everything after & including the final underscore up to the "." What is the best... (6 Replies)
Discussion started by: VeloLisa
6 Replies
5. Shell Programming and Scripting
Hai masters,
Suppose i have so many files named xxxx.ksh.tar, yyyy.ksh.tar and so on.
My requirement : i want to rename all the files with extension ".ksh.tar" to ".tar" in my directory.
Could you please tell me the solution for this.. (5 Replies)
Discussion started by: ecearund
5 Replies
6. Shell Programming and Scripting
Dear Friends,
Need your help once again.
I have this file name
e.g.1) report_12.rp_1
e.g.2) remark_mm.rmr_3
I want it to be renamed as
report_12_1.rp
remark_mm_3.rmr (3 Replies)
Discussion started by: anushree.a
3 Replies
7. UNIX for Dummies Questions & Answers
Hello all-
I need to rename files by adding an embedded 0
e.g.
aaa_bbb_1234 needs to become aaa_bbb_01234
The aaa and 1234 will change but the bbb_ can be my anchor.
TIA (9 Replies)
Discussion started by: ohagar
9 Replies
8. UNIX for Dummies Questions & Answers
Hi All,
I want to rename a file inside a script which has a date portion appended at the start of the file name.
The script i wrote works fine when the file comes on a day to day basis but sometimes it comes late too.
#!/usr/bin/ksh
cd /space/file/source
dt=$(date "date "+%m%d%Y")... (5 Replies)
Discussion started by: kumarsaravana_s
5 Replies
9. Shell Programming and Scripting
hi,
I have the following files as below.
reg_test_123232
reg_test_125654
reg_test_473843
How do I rename reg_test_123232 to abc_123232 and the rest of file by just keeping the numeric field ?
Please advise :) (3 Replies)
Discussion started by: cedrichiu
3 Replies
10. Shell Programming and Scripting
Hello,
i wanna rename my files which names are written in movies.txt
films.txt = amovie
bmovie
cmovie
dmovie
emovie
and i wanna find this files and rename the files to 1_amovie
... (12 Replies)
Discussion started by: redbeard_06
12 Replies