10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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
2. UNIX for Dummies Questions & Answers
Hi,
I have 31 file as below.... dt_ref_med_merged_madt_h_19980101.nc
..
..
dt_ref_med_merged_madt_h_19980131.nc
I want to rename it like...
dt_ref_med_merged_madt_h_1998_1.nc
..
..
dt_ref_med_merged_madt_h_1998_31.nc
How can I do it ? any suggestions ? I want to do it small... (5 Replies)
Discussion started by: mahesh shinde
5 Replies
3. Shell Programming and Scripting
Hello,
I am looking for a command line that will rename name files :
f700_abc_o_t_MASTERID_AS_AE_20130323.csv
like this
f700_abc_o_t_MASTERID_AS_AE_20130324.csv
The great idea could be to get the date stamp 20130323
and change any part of it, instead of just change the... (4 Replies)
Discussion started by: Aswex
4 Replies
4. Shell Programming and Scripting
Hi,
I have a file with about 50k keywords. I have a requirement to scan about 3k files to identify which filename has which keyword i.e. an output like following:
File1,Keyword1
File1,Keyword2
File3,Keyword1
.....
I have written a shell script which takes each of the 3k files, searches... (4 Replies)
Discussion started by: rjains
4 Replies
5. UNIX for Dummies Questions & Answers
I just used wget to obtain a bunch of html documents. Now they are named index.html, index.html.1, index.html.2, etc. I'd simply like to move the 1, 2, 3 etc. to the left before the .html, so the new names would be: index1.html, index2.html etc. I know this can be done with a simple script, but... (2 Replies)
Discussion started by: crl21
2 Replies
6. Shell Programming and Scripting
Can someone please help. Much appreciated!!
I have 4 directories, for ex...
/RUN1/ReportTable.nxt
/RUN2/ReportTable.nxt
/RUN3/ReportTable.nxt
/RUN4/ReportTable.nxt
I would like to write a for loop, to add the directory name to each ReportTable.nxt
I would like for it to be:
... (5 Replies)
Discussion started by: dirttysoufff
5 Replies
7. Shell Programming and Scripting
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
8. UNIX for Dummies Questions & Answers
I just can't figure this one out.
I have a lot of files name (for example) ABC1234.5678.ext
I need to rename these files U0105678PQRS
So I'm removing everything before the first "."
I'm keeping "5678" in the file name
Adding "U010" to the front of "5678"
Dropping the ".ext" extension
... (5 Replies)
Discussion started by: bbbngowc
5 Replies
9. Shell Programming and Scripting
Renaming Files more than 1000 in Diffrent Directories in system..
help me in this issue to resolve.... (5 Replies)
Discussion started by: sunsap
5 Replies
10. Shell Programming and Scripting
i'm halfway into my script and realize i may need to use an associative array (a hash, i guess they are called in Perl). i'm fairly new to Perl and don't know how to use them correctly.
i have some files in a directory. each file contains a number in a specific place in it's header. what i would... (4 Replies)
Discussion started by: quantumechanix
4 Replies