09-16-2012
1. Do you want only the files with names matching sasmm_fsbc_durds_id000[0-9]*_t?*.dat.trnsfr.gz to be renamed, or do you want every file matching id000[0-9]*_t to be renamed?
Quote:
All files matching sasmm_fsbc_durds_id000[0-9]*_t?*.dat.trnsfr.gz
2. Do you want the file names to restart at 7111 in each directory processed, or do you want files in all of the directories processed to be treated as a single list numbered starting at 7111 and incrementing for each file processed?
Quote:
I want to rename each file by incrementing starting from 7111 in all directories . After re-naming process, the files will be stayed in the same folder structure. We are just renaming files in the directories
march 01 2011 - 7111 -- > assuming there is only one file in this folder
march 02 2011 - 7112 --> this is in a directory of 2nd day in march folder and 2011 folder. again assuming there is only one file
if it goes on like with an assumption of one file in each day folder, there can be many files in each folder, this is just for sake of example.
after 30 days folders, in march , there is 30 dyas
apr 01 2011 - 7141; the file in day folder 01 , inside april folder and inside 2011 folder, the file_id in the file name is replaced with 7141.
3. Do you have a backup of this directory hierarchy in case something goes horribly wrong during the renaming process?
Quote:
I will take backup of all files
4. Are you absolutely sure that no file existing before this renaming process begins has a name that will match any new file name that will be created by this renaming process?
Quote:
no , this is freshly created IDs , no file names will conflicted ..
5. When you say you want these changes applied to files for dates:
Code:
---------
from 2011 -> 03 -> 01
to 2012 -> 03 - >26
---------
is that range inclusive or exclusive? (I'm assuming you want files in 2011/03/01 renamed, but it isn't at all clear whether you want files in 2012/03/26 renamed.)
Quote:
2011/03/01 [inclusive] to 2012/03/25(inclusive)
---------- Post updated at 08:24 AM ---------- Previous update was at 08:20 AM ----------
sasmm_fsbc_durds_id000
20079_t20110301010023.dat.trnsfr.gz
you have mentoned id000
20079 to id000[0-9]* ; does this [0-9] consider all digital numbers starting from 7111.
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a .csv file and i use the below while loop to navigate through it
But i need to loop from the second line since the first line is the header
How will i do it?? please help
while IFS=, read Filename Path size readonly
do
echo "Filename -> ${Filename}"
echo "Path -> ${Path}"
echo... (8 Replies)
Discussion started by: codeman007
8 Replies
2. Shell Programming and Scripting
Hi i have wriiten a script which fetches the data from text file, and saves in the output in a text file itself, but i want that the output should save in different columns.
I have the output like:
For Channel:response_time__24.txt
1547 data points
0.339
0.299
0.448
0.581
7.380
... (1 Reply)
Discussion started by: rohitkalia
1 Replies
3. Shell Programming and Scripting
Hi
I need to execute a select statement in a solaris environment with oracle database. The select statement returns number of rows of data.
I need the data to be inserted into a CSV file with proper format. For that we normally use "You have to select all your columns as one big string,... (2 Replies)
Discussion started by: rdhanek
2 Replies
4. UNIX for Dummies Questions & Answers
Hi Unix gurus,
Maybe it is too much to ask for but please take a moment and help me out. A very humble request to you gurus. I'm new to Unix and I have started learning Unix. I have this project which is way to advanced for me.
File format: CSV file
File has four columns with no header... (8 Replies)
Discussion started by: arvindosu
8 Replies
5. Shell Programming and Scripting
Hi,
I have a text file with the following format. Some of the fields are blank.
1234 3456 23 45464 327837283232 343434
5654353 34 34343 3434345 434242
....
....
....
I need to convert this file to a CSV file, like
1234, ,23, ... (3 Replies)
Discussion started by: wintersnow2011
3 Replies
6. Shell Programming and Scripting
Hi
I am writing a shell script to parse a CSV file , in which i am facing a problem to separate the columns . Could some one help me with it.
IN301330/00001 pvavan kumar limited xyz@ttccpp.com
IN302148/00002 PRECIOUS SECURITIES (P) LTD viash@yahoo.co.in
IN300239/00000 CENTRE india... (8 Replies)
Discussion started by: nanduri
8 Replies
7. Shell Programming and Scripting
Hi, all
I want to sort a csv file based on timestamp from oldest to newest and save the output as csv file itself. Here is an example of my csv file.
test.csv
SourceFile,DateTimeOriginal
/home/intannf/foto/IMG_0739.JPG,2015:02:17 11:32:21
/home/intannf/foto/IMG_0749.JPG,2015:02:17 11:37:28... (10 Replies)
Discussion started by: refrain
10 Replies
8. Shell Programming and Scripting
Hi,
I have another problem. I want to sort another csv file by the first field.
result.csv
SourceFile,Airspeed,GPSLatitude,GPSLongitude,Temperature,Pressure,Altitude,Roll,Pitch,Yaw
/home/intannf/foto5/2015_0313_090651_219.JPG,0.,-7.77223,110.37310,30.75,996.46,148.75,180.94,182.00,63.92 ... (2 Replies)
Discussion started by: refrain
2 Replies
9. UNIX for Beginners Questions & Answers
Hi All,
I have a data file and need to extract and convert it into csv format:
1) Read and extract the line containing string ending with "----" (file sample_linebyline.txt file) and to make a .csv file from this.
2) To read the flat file flatfile_sample.txt which consists of similar data (... (9 Replies)
Discussion started by: abhi_123
9 Replies
LEARN ABOUT CENTOS
ip6tables-save
IPTABLES-SAVE(8) iptables 1.4.21 IPTABLES-SAVE(8)
NAME
iptables-save -- dump iptables rules to stdout
ip6tables-save -- dump iptables rules to stdout
SYNOPSIS
iptables-save [-M,--modprobe modprobe] [-c] [-t table]
ip6tables-save [-M,--modprobe modprobe] [-c] [-t table]
DESCRIPTION
iptables-save and ip6tables-save are used to dump the contents of IP or IPv6 Table in easily parseable format to STDOUT. Use I/O-redirect-
ion provided by your shell to write to a file.
-M,--modprobe modprobe_program
Specify the path to the modprobe program. By default, iptables-save will inspect /proc/sys/kernel/modprobe to determine the exe-
cutable's path.
-c, --counters
include the current values of all packet and byte counters in the output
-t, --table tablename
restrict output to only one table. If not specified, output includes all available tables.
BUGS
None known as of iptables-1.2.1 release
AUTHORS
Harald Welte <laforge@gnumonks.org>
Rusty Russell <rusty@rustcorp.com.au>
Andras Kis-Szabo <kisza@sch.bme.hu> contributed ip6tables-save.
SEE ALSO
iptables-restore(8), iptables(8)
The iptables-HOWTO, which details more iptables usage, the NAT-HOWTO, which details NAT, and the netfilter-hacking-HOWTO which details the
internals.
iptables 1.4.21 IPTABLES-SAVE(8)