Sponsored Content
Top Forums Shell Programming and Scripting Convert Singleline to Multilines Post 302935847 by unme on Thursday 19th of February 2015 01:16:06 PM
Old 02-19-2015
Convert Singleline to Multilines

Hi All,

Could you please help to get the below output:

Input:
Code:
J1,ELLA_1,ISDR,JJK,TRS
J2,ROSTER,JACK
J3,HUP
...
...
...

Output:
Code:
J1,ELLA_1
J1,ISDR
J1,JJK
J1,TRS
J2,ROSTER
J2,JACK
J3,HUP
...
...
...

Thanks & Regards,
Ulf
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

To convert

Hi, I have a source file with 'Aug 1 2004' kind format. I need to search the records with certain period, like from Aug 1 2004 to Sep 20 2004. Can someone give me some ideas what I should start with? ThanX !! (1 Reply)
Discussion started by: whatisthis
1 Replies

2. Shell Programming and Scripting

here-doc convert 2 script convert to single script?

I have my main script calling another script to retrive a "ls -alt" of a directory that's located in a remote location I'm sftping into. main.sh #!/bin/ksh getLS.sh > output.txt getLS.sh #!/bin/sh /home<..>/sftp <host@ip> <<! cd /some/dir/Log ls -alt quit ! Basically I'd like to be... (2 Replies)
Discussion started by: yongho
2 Replies

3. Shell Programming and Scripting

convert to GB

hello, my objective is to calculate the swap size -bash-3.00# swap -l swapfile dev swaplo blocks free /dev/md/dsk/d1 85,1 8 33559776 16966160 so size=blocks*512/(1024*1024*1024) since blocks are 512-blocks any idea how to get it? so far I was able to... (6 Replies)
Discussion started by: melanie_pfefer
6 Replies

4. Shell Programming and Scripting

help to convert

how to convert this perl expression to Python while (<FIL>) { s/+/ /g; if (/<DOC\s+doc_ID=\"(.*?)\".*sys_ID=\"(.*?)\"/i) { #" ${$$hashptr{$sys_Id}}{$doc_Id} = $docstr; # push(@$doclistptr, $doc_Id); $doc_Id = $1; $sys_Id = $2; $docstr = ""; ... (1 Reply)
Discussion started by: jaganadh
1 Replies

5. Shell Programming and Scripting

Merge multiline into Singleline

Hi, I'm newbie in this forum and I already searched regarding Merge multiline into singleline but I always found different result which is I don't want it like i want. Here is the data that i have it: *** ALARM 711 A1/BTS "MAD08B1 08ACPA0"U 090604 1040 RADIO X-CEIVER ADMINISTRATION BTS... (5 Replies)
Discussion started by: inteliduy
5 Replies

6. Shell Programming and Scripting

Shell Script to convert multilines to single lines

Hi, I need to create an script which reads multi lines and convert it to single line or enter escape sequence at end "\". e.g. #!/bin/sh echo -e "provide me query to run" read query create table test( id int(11), name char); echo $query But it's failing because of multi line... (8 Replies)
Discussion started by: mirfan
8 Replies

7. Shell Programming and Scripting

Convert / to \

Hi, In my input variable values are c:/test/sample/ I need to convert it to c:\test\sample I need to find and replace it How do I do it? var_conversion=`"$var_SearchFile" | sed 's/'\'/'/'/g'` echo ${var_conversion%/*} My code throws error (4 Replies)
Discussion started by: magesh_bala
4 Replies

8. UNIX for Dummies Questions & Answers

Convert

my file or content of the file looks like this: HR-BUSPARTNET SC-POINQUIRY BATCH FIN-CHOPDATARESTRICT HR-DATABASEACCESSNOEXEC GL-EXTINQ RSS SC-APPROVER ESS all said and done, i'd like to have it look like this: ... (6 Replies)
Discussion started by: lawsongeek
6 Replies

9. Shell Programming and Scripting

sed multilines + separator confusion !!

Hi Seders, i am new to this forum, but i think it's quite the best place to post. So, here is my pb : I have a csv file, with comma separator and text enclosed by ". First pb is with text in " ......... ", wich sometimes includes lines break, and commas And to complicate a little more,... (4 Replies)
Discussion started by: yogeek
4 Replies

10. Shell Programming and Scripting

Script solution as singleline ?

Hello My script has following line and output find path -type d | awk -F "/" 'NF == 4{print $3}' path/custype=Type1/logdate=20160414 path/custype=Type11122/logdate=20160414 But I need following output that I need custtype information between "" like... (4 Replies)
Discussion started by: msuluhan
4 Replies
JACK-STDIN(1)						      General Commands Manual						     JACK-STDIN(1)

NAME
jack-stdin - write JACK audio data to stdin SYNOPSIS
jack-stdin [OPTIONS] port1 [ port2 ...] DESCRIPTION
jack-stdin reads raw audio data from standard-input and writes it to a JACK audio port. The number of given ports detemine the number of audio channels that are used. If more than one channel is given, the input audio-sample data needs to be interleaved. OPTIONS
-b, --bitdepth BITS Specify the bit-depth of each sample. For integer-encoding this can be 16 or 24. The default is 16. This setting is only used for integer encoding: Floating-point samples will always be 32 bit wide. -d, --duration SEC Specify the time for which jack-stdin should run in seconds. A value less than 1 means to run indefinitely. The default is 0 which reads until end-of-file. -e, --encoding FORMAT Set the input format of the data: signed-integer, unsigned-integer, floating-point (default: signed) -f, --file FILENAME Read data from given file instead of standard-input. -h, --help Print a brief usage information -p, --prebuffer PERCENT Pre-fill the buffer before starting audio output to JACK (default 50.0%). NOTE: disable pre-buffering (-p 0) or use a small buffer size to play back very short samples. -L, --little-endian The input-data is in little-endian byte-order or native-byte-order float (this is the default) -B, --big-endian Interpret input audio data in big-endian byte-order or swap the byte-order of floating-point. -q, --quiet Inhibit usual output. This affects information and buffer-overflow warnings but not setup-errors. -S, --bufsize SAMPLES Choose the internal buffer-size in samples. The default size is 65536. The given value will be multiplied by the number of channels and bit-depth to get the size of the ring-buffer. Note: the buffersize must be larger than JACK's period size. EXAMPLES
jack-stdout vlc_31994:out_1 vlc_31994:out_2 | sox -t raw -r 48k -e signed -b 16 -c 2 - -t raw -r 48k -e signed -b 16 -c 2 - tremolo 5 100 | ./jack-stdin system:playback_1 system:playback_2 cat /dev/dsp | jack-stdin system:playback_1 system:playback_2 KNOWN ISSUES
jack-stdin is not suitable to play-back files shorter than twice the jack-period size. AUTHOR
Robin Gareus <robin@gareus.org>. SEE ALSO
http://jackaudio.org/, 30 March 2011 JACK-STDIN(1)
All times are GMT -4. The time now is 11:08 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy