Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Seperate columns according to delimiters Post 302724687 by biopsy on Thursday 1st of November 2012 07:03:13 AM
Old 11-01-2012
Seperate columns according to delimiters

Hi all
I need your help to separate colomns based on "-" delimiter for a very big file 30 millions rows
I have a colmun looking like this :
Code:
clomun 1
1-100000989-A_ATC
1-10000179-AAAAA
1-100002154-TGTTA
1-100002155-GTTAG
1-100002443
1-100002490
1-100002619

I need to separte in three clomun
Code:
clomun1  clomun2      clomun 3
1           100000989    A_ATC
1           10000179     AAAAA
1           100002154    TGTTA
1           100002155    GTTAG
1           100002443
1           100002490
1           100002619


thank you

Last edited by Scrutinizer; 11-01-2012 at 08:04 AM.. Reason: code tags
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

row seperate

i have this sample data: test01 --- abc-01 name1 abc-02 name2 abc-03 name3 test02 --- abc-20 name4 abc-21 name5 test03 --- abc-22 name6 abc-23 name7 i want to generate a file... (13 Replies)
Discussion started by: inquirer
13 Replies

2. Shell Programming and Scripting

Need help to seperate data

Hello ALL, I really need help to grep data and store in particular format. I am struggling to write that script .Please help me to solve this problem otherwise i will loose my job... I have to compare 2 files and generate the staticts of the data. First file product.dat contains 2 column . ... (4 Replies)
Discussion started by: getdpg
4 Replies

3. Shell Programming and Scripting

Seperate commands on the same line

hello, is there a way to seperate commands that are on the same line? ie: echo "yes count(*)>0:" $passvar > dsp cat dsp cat dsp > log i'm trying to put these 3 commands on the same line, but when i do they all get concatenated into 1 lieteral if i put the cat commands on... (3 Replies)
Discussion started by: bobk544
3 Replies

4. Shell Programming and Scripting

seperate elements of a file

i want to write a script in Bash Shell that accept a list of files.an example of file is 4334:234 322.345:32 234:3452 e.t.c each file only contain lines like num1:num2 i want to count the lines of this file and find the summary of X=4334+322.345+234 and Y=234+32+3452 (1 Reply)
Discussion started by: nektarios4u
1 Replies

5. Shell Programming and Scripting

how to seperate a variable in 2 variables

Dear all, i dont know how to split one variable value in 2 variable. please send me any example. variable1= "abcde developer" now i want to seperate the values and seperator is space. (6 Replies)
Discussion started by: intikhabalam
6 Replies

6. Shell Programming and Scripting

Cutting a file with multiple delimiters into columns

Hi All I have recently had to start using Unix for work and I have hit brick wall with this prob.... I have a file that goes a little something like this.... EUR;EUR;EUR:USD:USD;USD;;;EUR/USD;XAU/AUD;XAU/EUR;XAU/AUD,GBP/BOB,UAD/XAU;;;1.11;2.22;3.33;4.44;5.55;6.66;;; is it possible to... (7 Replies)
Discussion started by: luckycharm
7 Replies

7. UNIX for Dummies Questions & Answers

How to seperate two lines that are joined?

i have something like this abc 123 3234 1234 * qqoiki * abc 4533 34 1234 * lloiki * i want to make it two lines i,e.,abc 123 3234 1234 * qqoiki * abc 4533 34 1234 * lloiki * how to do that ? (13 Replies)
Discussion started by: anurupa777
13 Replies

8. Shell Programming and Scripting

Insert Columns before the last Column based on the Count of Delimiters

Hi, I have a requirement where in I need to insert delimiters before the last column of the total delimiters is less than a specified number. Say if the delimiters is less than 139, I need to insert 2 columns ( with blanks) before the last field awk -F 'Ç' '{ if (NF-1 < 139)} END { "Insert 2... (5 Replies)
Discussion started by: arunkesi
5 Replies

9. Shell Programming and Scripting

Extract columns into seperate file

I have a comma delimited file as per the one below and I am currently extracting the values in 2 columns (COL1 & COL6) to produce a smaller trimmed down version of the file which only contains the columns we need; COL1,COL2,COL3,COL4,COL5,COL6,COL7,COL8,COL9... (1 Reply)
Discussion started by: Ads89
1 Replies

10. UNIX for Beginners Questions & Answers

For loop for seperate files

For shell script. If I had two separate files, file.txt and file1.txt and each has just a list of names from the who command. How would I create an if loop to compare each name? (1 Reply)
Discussion started by: Eric7giants
1 Replies
IRSEND(1)								FSF								 IRSEND(1)

NAME
irsend - basic LIRC program to send infra-red commands SYNOPSIS
irsend [options] DIRECTIVE REMOTE CODE [CODE...] DESCRIPTION
Asks the lircd daemon to send one or more CIR (Consumer Infra-Red) commands. This is intended for remote control of electronic devices such as TV boxes, HiFi sets, etc. DIRECTIVE can be: SEND_ONCE - send CODE [CODE ...] once SEND_START - start repeating CODE SEND_STOP - stop repeating CODE LIST - list configured remote items SET_TRANSMITTERS - set transmitters NUM [NUM ...] SIMULATE - simulate IR event REMOTE is the name of a remote, as described in the lircd configuration file. CODE is the name of a remote control key of REMOTE, as it appears in the lircd configuration file. NUM is the transmitter number of the hardware device. For the LIST DIRECTIVE, REMOTE and/or CODE can be empty: LIST "" "" - list all configured remote names LIST REMOTE "" - list all codes of REMOTE LIST REMOTE CODE - list only CODE of REMOTE The SIMULATE command only works if it has been explicitly enabled in lircd. -h --help display usage summary -v --version display version -d --device use given lircd socket [/var/run/lirc/lircd] -a --address=host[:port] connect to lircd at this address -# --count=n send command n times EXAMPLES
irsend LIST DenonTuner "" irsend SEND_ONCE DenonTuner PROG-SCAN irsend SEND_ONCE OnkyoAmpli VOL-UP VOL-UP VOL-UP VOL-UP irsend SEND_START OnkyoAmpli VOL-DOWN ; sleep 3 irsend SEND_STOP OnkyoAmpli VOL-DOWN irsend SET_TRANSMITTERS 1 irsend SET_TRANSMITTERS 1 3 4 irsend SIMULATE "0000000000000476 00 OK TECHNISAT_ST3004S" FILES
/etc/lirc/lircd.conf Default lircd configuration file. It should contain all the remotes, their infra-red codes and the corresponding timing and wave- form details. DIAGNOSTICS
If lircd is not running (or /var/run/lirc/lircd lacks write permissions) irsend aborts with the following diagnostics: "irsend: could not connect to socket" "irsend: Connection refused" (or "Permission denied"). SEE ALSO
The documentation for lirc is maintained as html pages. They are located under html/ in the documentation directory. lircd(8), mode2(1), smode2(1), xmode2(1), irrecord(1), irw(1), http://www.lirc.org. irsend 0.8.7pre1 May 2010 IRSEND(1)
All times are GMT -4. The time now is 03:34 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy