Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Split into multiple files by using Unique columns in a UNIX file Post 303036869 by RVSP on Monday 15th of July 2019 07:57:21 AM
Old 07-15-2019
Thank you for the reply, Sorry for the confusion, my desired output would be as below (Excludeing first 3 columns)

Code:
sample_123_22_56789.csv
ABCDEF|12AB34|2019-07-10|2019-07-10|443.3400|1|1
DEFGHI|56EF78|2019-07-10|2019-07-10|405.8800|1|2

Code:
sample_123_12_5679.csv
BCDEFG|34CD56|2019-07-10|2019-07-10|896.7200|1|2
CDEFGH|45DE67|2019-07-10|2019-07-10|680.9200|1|1


Last edited by jim mcnamara; 07-15-2019 at 01:18 PM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Split a file into multiple files

I have a file ehich has multiple create statements as create abc 123 one two create xyz 456 four five create nnn 666 six four I want to separte each create statement in seperate files (3 Replies)
Discussion started by: glamo_2312
3 Replies

2. UNIX for Dummies Questions & Answers

split a file into multiple files

Hi All, I have a file ABC.txt and I need to split this file on every 250 rows. And the file name should be ABC1.txt , ABC2.txt and so on. I tried with split command split -l 250 <filename> '<filename>' but the file name returned was ABC.txtaa ABC.txtab. Please... (8 Replies)
Discussion started by: kumar66
8 Replies

3. UNIX for Dummies Questions & Answers

Join multiple Split files in Unix

Hi, I have a big file of 50GB size. I need copy it to a second ftp from a ftp. I am not able to do the full 50GB transfer as it timesout after some time. SO i am trying to split the file into 5gb each 10 files with the below command. split -b 5368709120 pack.tar.gz backup.gz After I... (2 Replies)
Discussion started by: venu_nbk
2 Replies

4. Shell Programming and Scripting

Split a file into multiple files

Hi, i have a file like this: 1|2|3|4|5| 1|2|8|4|6| Trailer1||||| 1|2|3| Trailer2||| 3|4|5|6| 3|4|5|7| 3|4|5|8| Trailer2||| I want to generate 3 files out of this based on the trailer record. Trailer record string can be different for each file or it may be same for one or two. No... (24 Replies)
Discussion started by: pparthji
24 Replies

5. Shell Programming and Scripting

Split file into multiple files

Hi I have a file that has multiple sequences; the sequence name is the line starting with '>'. It looks like below: infile.txt: >HE_ER tttggtgccttgactcggattgggggacctcccttgggagatcaatcccctgtcctcctgctctttgctc cgtgaaaaggatccacctatgacctctagtcctcagacccaccagcccaaggaacatctcaccaatttca >M7B_Ho_sap... (2 Replies)
Discussion started by: jdhahbi
2 Replies

6. Shell Programming and Scripting

split file into multiple files

Hi, I have a file of the following syntax that has around 120K records that are tab separated. input.txt abc def klm 20 76 . + . klm_mango unix_00000001; abc def klm 83 84 . + . klm_mango unix_0000103; abc def klm 415 439 . + . klm_mango unix_00001043; I am looking for an awk oneliner... (2 Replies)
Discussion started by: jacobs.smith
2 Replies

7. Shell Programming and Scripting

Split file in unix into multiple files

Hi Gurus I have to split the incoming source file into multiple file. File contains some unwanted XML tags also . Files looks like some XML tags FILEHEADERABC 12 -- --- ---- EOF some xml tags xxxFILEHEADERABC 13 -- --- ---- EOF I have to ignore XML tags and only split file... (6 Replies)
Discussion started by: manish2608
6 Replies

8. Shell Programming and Scripting

awk script to split file into multiple files based on many columns

So I have a space delimited file that I'd like to split into multiple files based on multiple column values. This is what my data looks like 1bc9A02 1 10 1000 FTDLNLVQALRQFLWSFRLPGEAQKIDRMMEAFAQRYCQCNNGVFQSTDTCYVLSFAIIMLNTSLHNPNVKDKPTVERFIAMNRGINDGGDLPEELLRNLYESIKNEPFKIPELEHHHHHH 1ku1A02 1 10... (9 Replies)
Discussion started by: viored
9 Replies

9. Shell Programming and Scripting

Compare columns of multiple files and print those unique string from File1 in an output file.

Hi, I have multiple files that each contain one column of strings: File1: 123abc 456def 789ghi File2: 123abc 456def 891jkl File3: 234mno 123abc 456def In total I have 25 of these type of file. (5 Replies)
Discussion started by: owwow14
5 Replies

10. Shell Programming and Scripting

Reading multiple values from multiple lines and columns and setting them to unique variables.

Hello, I would like to ask for help with csh script. An example of an input in .txt file is below, the number of lines varies from file to file and I have 2 or 3 columns with values. I would like to read all the values (probably one by one) and set them to independent unique variables that... (7 Replies)
Discussion started by: FMMOLA
7 Replies
cn(1)							    BSD General Commands Manual 						     cn(1)

NAME
cn, -- Command line interface to CommonNumerics routines. SYNOPSIS
cn, [-p prompt] [command] [command_options] [command_args] DESCRIPTION
A simple command line utility allowing you to perform CRC and Base Encode/Decode with the Common Numerics functions. cn, has the following standard options for all sub-commands: -h Show help information. -a Use the specified algorithm. The CRC, Encode, and Decode commands have various algorithms that can be used on data provided to them. -s -<string> Performs the operation on the specified string value. -v Function in Verbose mode. CN COMMAND SUMMARY
cn, currently only provides functions for two activities: CRC calculation and Base Encoding and Decoding (base16, base32, base64). Here are brief descriptions of all the cn, commands: crc Perform a CRC on the data provided either as a string or on stdin. Algorithms 10 - kCN_CRC_8 11 - kCN_CRC_8_ICODE 12 - kCN_CRC_8_ITU 13 - kCN_CRC_8_ROHC 14 - kCN_CRC_8_WCDMA 20 - kCN_CRC_16 21 - kCN_CRC_16_CCITT_TRUE 22 - kCN_CRC_16_CCITT_FALSE 23 - kCN_CRC_16_USB 24 - kCN_CRC_16_XMODEM 25 - kCN_CRC_16_DECT_R 26 - kCN_CRC_16_DECT_X 27 - kCN_CRC_16_ICODE 28 - kCN_CRC_16_VERIFONE 29 - kCN_CRC_16_A 30 - kCN_CRC_16_B 31 - kCN_CRC_16_Fletcher 40 - kCN_CRC_32_Adler 41 - kCN_CRC_32 42 - kCN_CRC_32_CASTAGNOLI 43 - kCN_CRC_32_BZIP2 44 - kCN_CRC_32_MPEG_2 45 - kCN_CRC_32_POSIX 46 - kCN_CRC_32_XFER 60 - kCN_CRC_64_ECMA_182 Encode|Decode Encode or Decode data provided either as a string or on stdin using one of the algorithms specified below. Algorithms 1 - kCNEncodingBase64 2 - kCNEncodingBase32 3 - kCNEncodingBase32Recovery 4 - kCNEncodingBase32HEX 5 - kCNEncodingBase16 ENVIRONMENT
CN_READ_SIZE The "read size" to use when processing incoming data. CN_WIDTH The number of columns in which to output data when performing a base encoding. The default is 64 columns. HISTORY
cn, was introduced in Mac OS X version 10.9 and iOS version 7.0. Darwin June 2, 2019 Darwin
All times are GMT -4. The time now is 09:21 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy