Sponsored Content
Top Forums Shell Programming and Scripting Split file according to column values Post 302873879 by Yoda on Wednesday 13th of November 2013 11:26:24 AM
Old 11-13-2013
Replace $NF with $1
This User Gave Thanks to Yoda For This Post:
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to check Null values in a file column by column if columns are Not NULLs

Hi All, I have a table with 10 columns. Some columns(2nd,4th,5th,7th,8th and 10th) are Not Null columns. I'll get a tab-delimited file and want to check col by col and generate seperate error code for each col eg:102 if 2nd col value is NULL and 104 if 4th col value is NULL so on... I am a... (7 Replies)
Discussion started by: Mandab
7 Replies

2. Shell Programming and Scripting

Split file by column value

Please help me figure out whats wrong with my code, I have to split a file according to values in 3rd thru 6th column, If the 3rd or 4th col values are >0, row goes to 1 file, if 3rd and 5th are >0,row goes to another file...and so on... What is wrong with my code? It doesn't seem to work.... (2 Replies)
Discussion started by: newbie83
2 Replies

3. UNIX for Dummies Questions & Answers

Split file based on column

i have file1.txt asdas|csada|130310|0423|A1|canberra sdasd|sfdsf|130426|2328|A1|sydney Expected output : on eaceh third and fourth colum, split into each two characters asdas|csada|13|03|10|04|23|A1|canberra sdasd|sfdsf|13|04|26|23|28|A1|sydney (10 Replies)
Discussion started by: radius
10 Replies

4. Shell Programming and Scripting

Split file depending on Column Value

Hi , my file look likes below , cat file.csv 12/09/2014,50,5,0,300 12/09/2014, ,5,0,300 12/09/2014,50,,,300 i need to split file , the first one contains values (2nd column is 50 , 3rd and fourth column is null ) the second file contains all others firstfile ... (2 Replies)
Discussion started by: ubaisalih
2 Replies

5. Shell Programming and Scripting

Remove the values from a certain column without deleting the Column name in a .CSV file

(14 Replies)
Discussion started by: dhruuv369
14 Replies

6. Shell Programming and Scripting

Split file by column value, each with header

Hello all, I have a csv with with different testcase values in column 5. year,min,max,Instrument,Testcase 2016,201,1003,GEOTROPH-02116,TATA7980 2016,53,1011,GEOTROPH-01963,TATA7980 2016,3,1024,GEOTROPH-02067,TATA7980 2016,203,1027,GEOTROPH-02011,TATA7980... (16 Replies)
Discussion started by: senhia83
16 Replies

7. Shell Programming and Scripting

How to split a file into column with awk?

The following is my code nawk -F',' ' BEGIN { printf "MSISDN,IMSI,NAM,TS11,TS21,TS22,OBO,OBI,BAIC,BAOC,BOIC,BOIEXH,APNID0,APNID1,APNID2,APNID3,APNID0,CSP,RSA\n" } { for(i=1; i<=NF; i++) { split($i,a,":") gsub(" ","", a) printf "%s;",a } printf "\n" }'HLR_DUMP_BZV >> HLR_full This is... (1 Reply)
Discussion started by: gillesi
1 Replies

8. Shell Programming and Scripting

Split file when value in column is blank

Hi Experts, In short : Need to split file when field in column 5 is blank and need to generate two file in which column 5 is blank and other in which column 5 has values along with other rows and column data My issue is i am not able to get header for column from raw file into new file which... (4 Replies)
Discussion started by: as7951
4 Replies

9. Shell Programming and Scripting

To Split the file based on column value

Hi Team, I have a requirement in such a way that need to split the file into two based on which column particular value appears.Please find my sample file below. Lets consider the delimiter of this file as either comma or two colons.(:: and ,). So I need to split the file in such a way that all... (2 Replies)
Discussion started by: ginrkf
2 Replies
MP3ROASTER(1)						User Contributed Perl Documentation					     MP3ROASTER(1)

NAME
mp3roaster - A Perl hack for burning audio CDs out of MP3/OGG/FLAC/WAVs SYNOPSIS
mp3roaster [OPTION]... "MP3/OGG/FLAC/WAV files" DESCRIPTION
mp3roaster A Perl hack for burning audio CDs out of MP3, OGG VORBIS and FLAC files. The main highlights of this application are an easy to use command line syntax and automatic volume leveling support for best audio CD quality. ENVIRONMENT
MP3Roaster should run on all Unix like operating systems which have Perl and wodim installed. It has been developed on Debian GNU/Linux. OPTIONS
All options have been imported, now we should add specific descriptions for each option. -D, --dev CDR device to use -s, --speed Burn speed -d, --dummy Burn with laser off -a, --dao Burn in disk-at-once (DAO) mode for gapless recording -b, --burnfree Turn on Buffer Underrun Free writing -t, --temp Temporary directory -m, --mp3dec MP3 decoder to use -l, --lowercase Convert filenames to lowercase -S, --spaces Replace spaces with underscores -B, --brackets Replace brackets with underscores -q, --quotes Replace quotes with underscores -Q, --questions Replace questionmarks with underscores -n, --normalize Normalize WAV files before burning -N, --no-normalize Don't normalize WAV files, even if --normalize is specified (either as a command line argument or in the configuratino file) -y, --no-confirm Don't prompt for confirmation. -w, --wodim-opts Specify options to pass to Wodim for CD recording -v, --verbose Enable verbose output -h, --help Show the help screen -V, --version Show version and infos RETURN VALUE
mp3roaster returns 0 on success, 1 on error. DIAGNOSTICS
This has to be written yet. EXAMPLES
Once correctly configured MP3Roaster is very easy to use, just launch it from the command line with a bunch of compressed audio files, here is a short example: % mp3roaster "Root Dance.mp3" Free Software.flac bar.ogg Decoded.wav This will burn Root Dance.mp3, Free Software.flac bar.ogg and Decoded.wav on your audio CD preserving the song order as specified on the command line. Here is another example showing the usage of command line options like the dummy option: % mp3roaster -d "Root Dance.mp3" Free Software.flac bar.ogg Decoded.wav This will do the same job as above but with the laser of your CD writer turned off, so no data will be really written. You see MP3Roaster is really easy to use, this was one of my main goals while I've written the code: Keep it simple ;) FILES
MP3Roaster can be configured through a system wide and a personal configuration file. When you run MP3Roaster it will first check for your personal configuration file in your home directory, if no one is found it will fall-back to the system wide configuration files placed in /etc. By default MP3Roaster installs the configuration files in /etc/mp3roaster, but there are other possible file locations for the configuration file: . System wide configuration in /etc . /etc/mp3roaster/mp3roasterrc (DEFAULT) . /etc/mp3roasterrc . Personal configuration in your home . ~/.mp3roaster/mp3roasterrc . ~/.mp3roasterrc So if you want to have personal MP3Roaster configuration file just copy the system wide configuration file to your home directory and edit it. CAVEHEATS
None actually. BUGS
There may be some minor troubles regarding file names, feel free to report any bugs you may encounter (In fact you shouldn't). NOTES
There are currrently no special notes. SEE ALSO
wodim. AUTHOR
Ivo Marino <eim@users.sourceforge.net> Lorenzo Taylor <lorenzo1@users.sourceforge.net> HISTORY
Take a look at the ChangeLog for now. perl v5.14.2 2012-01-10 MP3ROASTER(1)
All times are GMT -4. The time now is 01:17 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy