Sponsored Content
Top Forums Shell Programming and Scripting Display mutiple line in single line Post 302257066 by manosubsulo on Tuesday 11th of November 2008 09:52:50 AM
Old 11-11-2008
Display mutiple line in single line

Hi All,

I had a file called Input.txt, i need to group up in a single line as 1=ttt and the no of lines may vary bewteen the 1=ttt

Code:
 
cat Input.txt
1=ttt,2=xxxxxx, 3=4545
44545, 4=66667
7777, 5=77723
1=ttt, 2=xxxxxx, 3=34436 66
3545, 4=66666, 5=ffffff, 6=uuuuuuu
1=ttt, 2=xxxxxx, 3=311343545, 4=66666
1=ttt, 2=xxxxxx, 5=XAXAXA, 7=FDFD
 
O/p :
 
1=ttt,2=xxxxxx, 3=454544545, 4=66667 7777, 5=77723
1=ttt, 2=xxxxxx, 3=34436 663545, 4=66666, 5=ffffff, 6=uuuuuuu
1=ttt, 2=xxxxxx, 3=311343545, 4=66666
1=ttt, 2=xxxxxx, 5=XAXAXA, 7=FDFD

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

single line input to multiple line output with sed

hey gents, I'm working on something that will use snmpwalk to query the devices on my network and retreive the device name, device IP, device model and device serial. I'm using Nmap for the enumeration and sed to clean up the results for use by snmpwalk. Once i get all the data organized I'm... (8 Replies)
Discussion started by: mitch
8 Replies

2. UNIX for Advanced & Expert Users

Remove first line from mutiple files

How to remove the first line from multiple files and use it as source to the jobs. Only at the runtime it should remove the first line not in the file . (1 Reply)
Discussion started by: etldeveloper
1 Replies

3. Shell Programming and Scripting

Joining multi-line output to a single line in a group

Hi, My Oracle query is returing below o/p ---------------------------------------------------------- Ins trnas value a lkp1 x a lkp1 y b lkp1 a b lkp2 x b lkp2 y ... (7 Replies)
Discussion started by: gvk25
7 Replies

4. Shell Programming and Scripting

Formatting File having big single line into 95 Char Per Line

Hi All, I have 4 big files which contains one big line containing formatted character records, I need to format each file in such way that each File will have 95 Characters per line. Last line of each file will have newline character at end. Before:- File Name:- File1.dat 102 121340560... (10 Replies)
Discussion started by: lancesunny
10 Replies

5. Shell Programming and Scripting

sed command to grep multiple pattern present in single line and delete that line

here is what i want to achieve.. i have a file with below contents cat fileName blah blah blah . .DROP this REJECT that . --sport 7800 -j REJECT --reject-with icmp-port-unreachable --dport 7800 -j REJECT --reject-with icmp-port-unreachable . . . more blah blah blah --dport 3306... (14 Replies)
Discussion started by: vivek d r
14 Replies

6. Shell Programming and Scripting

How to separate one line to mutiple line based on one char?

Hi Gurus, I need separate one file which is one huge line to mutiple line. file like abcd # bcd # def # fge # ged I want to get abcd bcd def fge ged Thanks in advance (4 Replies)
Discussion started by: ken6503
4 Replies

7. Shell Programming and Scripting

[Solved] How to separate one line to mutiple line based on certain number of characters?

hi Gurus, I need separate a file which is one huge line to multiple lines based on certain number of charactors. for example: abcdefghi high abaddffdd I want to separate the line to multiple lines for every 4 charactors. the result should be abcd efgh i hi gh a badd ffdd Thanks in... (5 Replies)
Discussion started by: ken6503
5 Replies

8. UNIX for Dummies Questions & Answers

To find and display the middle line in a file using single line command.

Hi all, How can i display the middle line of a file using a single line command? (6 Replies)
Discussion started by: Lakme Pemmaiah
6 Replies

9. UNIX for Beginners Questions & Answers

Output to file print as single line, not separate line

example of problem: when I echo "$e" >> /home/cogiz/file.txt result prints to file as:AA BB CC I need it to save to file as this:AA BB CC I know it's probably something really simple but any help would be greatly appreciated. Thank You. Cogiz (7 Replies)
Discussion started by: cogiz
7 Replies

10. Shell Programming and Scripting

Multi line log files to single line format

I want to read the log file which was generate from other command . And the output was having multi line in log files for job name and server name. But i need to make all the logs on one line Source file 07/15/2018 17:02:00 TRANSLOG_1700 Server0005_SQL ... (2 Replies)
Discussion started by: ranjancom2000
2 Replies
wml::des::imgbg(3)						     EN Tools							wml::des::imgbg(3)

NAME
wml::des::imgbg - Background Images SYNOPSIS
#use wml::des::imgbg <: $file = &imgbg($base, $direction, $content, $pixels, $format); :> <body ... background=<imgbg [attributes]> ...> DESCRIPTION
The usual purpose of this tag is to create a PNG or GIF image containing a background image and to expand to its filename. Its contents is specified via the "content" attribute by use of size/color pairs. ATTRIBUTES
"base" Usually the created images are named imgbg-xxxxxx.png where "xxxxxx" is the content id of the image. When you use a "base=foo" attribute, then the resulting files are named foo.imgbg-xxxxxx.png. Actually you can even use a complete filename including a directory prefix, i.e. when you use "base=../../common/foo" attribute, then the images are created as ../../common/foo.imgbg-xxxxxx.png. And for most flexibility when no base is specified and the variable "BGIMG_BASE" is defined (usually from within a .wmlrc file via "-DBGIMG_BASE~path/to/imgbg/dir/base") it is used. Use this feature to redirect the created images to a particular directory. You may also use the variable "IMAGE_BASE" which defines in a single line all base names for images generated by WML. "format" By default, GIF images are generated. This attribute lets you use an alternate image format (actually only PNG and GIF are recognized). You may also change the default format with the variable "IMAGE_FORMAT". "direction" Specifies the color change direction of the image: ``"h"'' for horizontal (default) or ``"v"'' for vertical. "pixels" Size of the image in the other direction, 1 by default. "content" This is a comma-separated list of size/color specifications ``pixels":#"rrggbb":#"rrggbb":"slices'' The last two arguments are optional, only present for gradient images. In this case, a linear gradient line is drawn from color 1 to color 2, with slices different colors. To get a background with two columns, a black one with 150 point in size and a white one which fills the rest of the page use ``"150:#000000,1200:#ffffff"''. AUTHORS
Ralf S. Engelschall rse@engelschall.com www.engelschall.com Denis Barbier barbier@engelschall.com REQUIRES
Internal: P1, P2, P3 SEE ALSO
HTML <"body"> tag. EN Tools 2014-04-16 wml::des::imgbg(3)
All times are GMT -4. The time now is 09:02 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy