Sponsored Content
Top Forums Shell Programming and Scripting FILE_ID extraction from file name and save it in CSV file after looping through each folders Post 302700639 by Don Cragun on Thursday 13th of September 2012 09:34:16 PM
Old 09-13-2012
First you say that filenames in the directory 2012/09/13 are:
Code:
sasmm_fsbc_durds_id00020532_t20100313192606.dat.trnsfr.gz 
sasmm_fsbc_durds_id00020513_t20120913003312.dat.trnsfr.gz

and then you say you want the entire filename to be the second field in your output file and say that that field should be:
Code:
sasmm_fsbc_durds_id00020532_t20100313192606.dat
sasmm_fsbc_durds_id00020513_t20120913003312.dat

What happened to the .trnsfr.gz at the end of the filenames?

Is the file_id field always supposed to be a string a decimal digits or could other characters appear in the file_id?

Is there any chance that there will be more than one occurrence of _t in a filename after sasmm_fsbc_durds_id000?

Should an error be reported if other files exist under 2???/[01][0-9]/[0-3][0-9] with filenames that that don't start with sasmm_fsbc_durds_id000 and contain _t after that?
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how to start looping from the second line in .csv file

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

Data fetched from text file and save in a csv file

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

select data from oracle table and save the output as csv file

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

CSV file:Find duplicates, save original and duplicate records in a new file

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

need to save the space when converting to CSV file

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

CSV file data extraction

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

Save output of updated csv file as csv file itself

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

Save output of updated csv file as csv file itself, part 2

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

Data extraction and converting into .csv file.

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
bsnes-purify(6) 						   Games Manual 						   bsnes-purify(6)

NAME
bsnes-purify - Tool for preparing ROMs for usage with bsnes SYNOPSIS
bsnes-purify scan source-dir output-file bsnes-purify output source-dir target-dir DESCRIPTION
bsnes can not open all ROMs. For example SNES ROMs have to be without copier headers and with the filename extension .sfc. Recent versions of bsnes support games to be arranged in cartridge folders (see below). bsnes 0.089 and later will only support cartridge folders. bsnes-purify searches a directory for ROMs and performs an action on them. It also finds ROMs contained in .zip files. bsnes-purify scan writes a list of the found ROMs together with their SHA256 checksums and sizes to a file. bsnes-purify output creates for each found ROM a cartridge folder with the files program.rom and and manifest.xml in the target directory. If the original ROM was a headered SNES ROM, program.rom will be the same, but without the header. CARDRIDGE FOLDERS
Cartridge folders are intendended to contain all data belonging to a game. The name of a cartridge folder has to end with one of the file- name extensions sfc, fc, gb, gbb, gbc or gba, depending on the system the game is for. The user has to make sure that the following files exist program.rom the game ROM manifest.xml Additional data about the cartridge, generated by bsnes-purify. Sometimes bsnes-purify can't guess all the information for this file and it has to be edited manually. dsp1.rom, dsp1b.rom, dsp2.rom, dsp3.rom, dsp4.rom, st010.rom, st011.rom, st018.rom or cx4.rom Some SNES games have pre-programmed coprocessors (DSPs) built into their cartridges. For these games, the required DSP programs also need to be in the cartridge folders. bsnes itself also writes files to cartridge folders, for example the data that would be saved to RAM in real cartridges to save progress, or bsnes specific save states. For further details, please ask at http://board.byuu.org/. SEE ALSO
bsnes(6) MAN PAGE AUTHOR
Tobias Hansen May 11, 2012 bsnes-purify(6)
All times are GMT -4. The time now is 01:58 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy