Combining multiple block of lines in one comma separated line


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Combining multiple block of lines in one comma separated line
# 8  
Old 09-01-2014
@RavinderSingh, thanks for your reply. I yet to try out the code. Will let you know as soon as I can.

Thanks again.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

AIX put comma separated data on its own line

In Linux you can do this to put comma separated data on its own line like this. sed 's/ */&\n/g' /tmp/ports sed 's/ */\n/g' /tmp/ports How do you do this in AIX? It is not working. Is there another way to do this? Something like this. 1, 2, 3, 4 To look like this. 1 2 3 4 (4 Replies)
Discussion started by: cokedude
4 Replies

2. Shell Programming and Scripting

Comma separated values to individual lines

My OS : RHEL 6.7 I have a text file with comma separated values like below $ cat testString.txt 'JOHN' , 'KEITH' , 'NEWMAN' , 'URSULA' , 'ARIANNA' , 'CHENG', . . . . I want these values to appear like below 'JOHN' , 'KEITH' , 'NEWMAN' , 'URSULA' , 'ARIANNA' , 'CHENG', .... (4 Replies)
Discussion started by: kraljic
4 Replies

3. Shell Programming and Scripting

awk to change comma separated line to horizontal

I am trying to change a file that looks like this: file, announcement,date, server, server01, server02, server06, file04, rec01, rec04, rec03... etc into a vertical file like this: file announcement date server server01 server02 server06 The file does not have to be sorted... (5 Replies)
Discussion started by: newbie2010
5 Replies

4. Shell Programming and Scripting

Make multiple lines into single quoted comma separated Linux

Hi, I want to change a file file1.txt: 1234 3456 2345 6789 3456 2333 4444 As, file2.txt in Linux: '1234','3456','2345','6789','3456','2333','4444' Could someone please help me. (Single liner sed, awk will be welcome!) (7 Replies)
Discussion started by: wiweq05
7 Replies

5. Shell Programming and Scripting

Reading Words separated by comma in line

Hi All, I am facing issue, to read words in line, line as follow and i want to read word at each comma 1,you,are,two So i want read like 1 you are two Thanks (1 Reply)
Discussion started by: sujit_kashyap
1 Replies

6. Shell Programming and Scripting

Assigning Multiple Comma Separated IP's To A Bash Array

I am in the process of creating a BASH shell scripts for a project at work. So the scenario is as such: I have a file with each line entry separated by ':' ... (3 Replies)
Discussion started by: metallica1973
3 Replies

7. Programming

PERL:Combining multiple lines to single line

Hi All I need a small help for the below format in making a small script in Perl or Shell. I have a file in which a single line entries are broken into three line entries. Eg: I have a pen and notebook. All i want is to capture in a single line in a separate file. eg: I have a pen and... (4 Replies)
Discussion started by: Kalaiela
4 Replies

8. UNIX for Dummies Questions & Answers

sort comma separated lines by specific columns

Hello, I have a file which lines' words are comma separated: aa, bb, cc, uu b, ee, ff bb, cc, zz, ee, ss, kk oo, bb, hh, uu a, xx, ww tt, aa, dd, yy aa, gg I want to sort first by second column and in case of tie by fourth column with sort command. So the output would be: ... (4 Replies)
Discussion started by: asanchez
4 Replies

9. Shell Programming and Scripting

printing sequence of line no. with comma separated

Kindly i want to concatenate every 12 lines ina file, using a comma separator between fields (each line)? can anyone help please? thanks a lot in advance. (5 Replies)
Discussion started by: m_wassal
5 Replies

10. Shell Programming and Scripting

Deleting a column in multiple files that are comma separated

Hi, I have a directory that contains say 100 files named sequencially like input_1.25_50_C1.txt input_1.25_50_C2.txt input_1.25_50_C3.txt input_1.25_50_C4.txt .. .. .. input_1.25_50_C100.txt an example of the content in each of the file is: "NAME" "MEM.SHIP" "cgd1_10" "cgd1_10"... (9 Replies)
Discussion started by: Lucky Ali
9 Replies
Login or Register to Ask a Question
CYCBUFF.CONF(5) 						File Formats Manual						   CYCBUFF.CONF(5)

NAME
cycbuff.conf - configuration file for CNFS method DESCRIPTION
The file <pathetc in inn.conf>/cycbuff.conf is required if CNFS (Cyclic News File System) method is used. CNFS is one of storage method which can be defined at storage.conf(5). The file consists of a series of lines; blank lines and lines beginning with a number sign (``#'') are ignored. There are four kinds of configuration lines: ``cycbuffupdate'', ``refreshinterval'', ``cycbuff'' and ``metacycbuff.'' The order of lines in this file is not important among the same kind of configuration line. But all ``cycbuff'' lines should be presented before any ``metacycbuff'' lines. ``Cycbuffupdate'' line is formatted as: cycbuffupdate:update ``Update'' is how many article-stores between cycbuff header updates. This line can be omitted and the default value is ``25.'' ``Refreshinterval'' line is formatted as: refreshinterval:interval ``Inerval'' is what interval (seconds) between rereading cycbuff header if cycbuff is preopend. (This is in the case nnrpd(8) runs as a daemon.) This line can be omitted and the default value is ``30.'' ``Cycbuff'' line is formatted as: cycbuff:buffer_name:file_name:buffer_size ``Buffer_name'' is the symbolic name of the buffer. The length of this name should be within 7 letters. This name is referred at ``meta- cycbuff'' lines. ``File_name'' is the path to buffer file. The length of this path should be within 63 letters. ``Buffer_size'' is the length of buffer file in kilobytes in decimal (1KB = 1024 bytes). If the ``file_name'' is not a special device, the file should be buf- fer_size * 1024 bytes. ``Metacycbuff'' line is formatted as: metacycbuff:meta_cyclic_buffer_name:buffer_names[:mode] ``Meta_cyclic_buffer_name'' is the symbolic name of meta-cyclic buffer. This name is referred at ``options'' field at ``cnfs'' entries in storage.conf(5). ``Buffer_names'' is comma separated list of symbolic names of ``cycbuff.'' These buffer names should be defined at ``cycbuff'' lines. If ``buffer_names'' has more than one buffer names, CNFS method stores articles into each ``cycbuff'' in order cycli- cally. ``Mode'' is the mode of storing article. Currently there are two mode; ``INTERLEAVE'' and ``SEQUENTIAL''. Mode ``INTERLEAVE'' is to store articles into each cycbuff in round robin way. Mode ``SEQUENTIAL'' is to store articles sequentially into one cycbuff until it is filled up. ``Mode'' is optional and the default value without this option is ``INTERLEAVE''. Also it is necessary to set up ``options'' field at ``cnfs'' entries in storage.conf(5) to use CNFS method. That field should be one of ``meta_cyclic_buffer_name'' defined at ``metacycbuff'' lines. To create new ``cycbuff'', there are two different methods for creating the cyclic buffer files. 1. Create a big file on top of a standard filesystem. The use "dd" to create the ``cycbuff'' files, such as "dd if=/dev/zero of=/path/to/cycbuff bs=32k count=N" where N is the buf- fer_size divided by 32. 2. Use block disk devices directly. If your operating system will allow you to mmap() block disk devices (Solaris does, FreeBSD does not), this is the recommended method. Partition the disks to make each partition slightly larger (a few MB larger) than the intended size of each cycbuff. It is not recommend to use the block device files already located in ``/dev.'' Instead, use "mknod" to create a new set of block device files. In order to do this, do an "ls -Ll" of the /dev/dsk partition. The major and minor device numbers are in the fifth and sixth columns (right before the date) respectively. This information should be fed to "mknod" to make a "block-type special file" (b). Here is a short script that accomplishes this when fed the ``/dev/dsk/'' partition name: #!/bin/sh disk=$1 link=`ls -l /dev/dsk/$disk | awk '{print $11}'` major=`ls -l /dev/dsk/$link | awk '{print $5}' | tr -d ,` minor=`ls -l /dev/dsk/$link | awk '{print $6}` mkdir /cycbuff mknod /cycbuff/$disk b $major $minor The created device files themselves consume very little space. In either case, make certain that each overview buffer file is owned by <USER specified with --with-news-user at configure>, <GROUP speci- fied with --with-news-group at configure>, and has read/write modes for the owner and group (mode ``0664'' or ``0660''). When you first start innd and everything is configured properly, you should see messages in news.notice which look like: Mar 1 00:00:00 kevlar innd: CNFS-sm No magic cookie found for cycbuff ONE, initializing HISTORY
Written by Katsuhiro Kondou <kondou@nec.co.jp> for InterNetNews. This is revision 1.13.2.1, dated 2000/08/17. SEE ALSO
inn.conf(5), storage.conf(5). CYCBUFF.CONF(5)