Sponsored Content
Full Discussion: Join the lines
Top Forums Shell Programming and Scripting Join the lines Post 302357401 by Beginer0705 on Tuesday 29th of September 2009 05:47:15 PM
Old 09-29-2009
Join the lines

Hi All,

Currently, the output looks like this:

Code:
hdisk0
queue_depth:3
hdisk1
queue_depth:3
hdisk2
queue_depth:1
hdisk3
queue_depth:1



I need to change the format to look like this:

Code:
hdisk0 queue_depth:3
hdisk1 queue_depth:3
hdisk2 queue_depth:1
hdisk3 queue_depth:1

Thanks very much!

Last edited by vgersh99; 09-29-2009 at 06:49 PM.. Reason: code tags, PLEASE!
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

join two lines together

Hi, I have a file with on one line a uid, and on the next line a date. I am trying to make the to into one line. Here's an example: koppx 20031125 kraan 20031119 sarox 20031107 And this is what i want it to be: koppx;20031125 kraan;20031119 sarox;20031107 I have been trying... (4 Replies)
Discussion started by: tine
4 Replies

2. Shell Programming and Scripting

Join Every 5 Lines With $ Symbol

Hi All, I have output like this in one file. IFName: aust00m1.mis.amat.com ] ObjID: 5eceea48-0d59-71dd-1512-9887a1f10000 IFAlias: Dest: AMNA austkchr1-ser0/0/0:0.315 Type: FRASI CID: DHEC.559128 IFDescription: ATM9/1/0.315-atm subif Status: Normal IFName: aust00m1.mis.amat.com ] ObjID:... (3 Replies)
Discussion started by: ntgobinath
3 Replies

3. UNIX for Dummies Questions & Answers

how to join lines

can anyone tell me as "how to join all lines in a file " using a shell script Actually i have many files in a directory and for each file i want to join all the lines using a shell scrip . Thanks in advance!!! (8 Replies)
Discussion started by: glamo_2312
8 Replies

4. Shell Programming and Scripting

join lines

input1 x x input2 y x x z join input1 input2>>output ouput x x (2 Replies)
Discussion started by: repinementer
2 Replies

5. Shell Programming and Scripting

join 2 lines

hi all i have sample and i need script to do this /dev/xxx oracle test /dev/sap 9999 000 88 99 i need the out put like this /dev/xxx oracle test /dev/sap 9999 000 88 99 can any one provide me with an idea to solve this problem (8 Replies)
Discussion started by: maxim42
8 Replies

6. Shell Programming and Scripting

join two lines

I want to join this two lines but only when after him I have nothing or a comma Yes, I know Jonesy, and I'll give him about one more minute. this two lines must become Yes, I know Jonesy, and I'll give him about one more minute. thank you very much (11 Replies)
Discussion started by: thailand
11 Replies

7. Shell Programming and Scripting

join lines in file

I have a file like this: --------------------------------------------------------------- 26 00:04:48,440 --> 00:04:51,440 I don't know why he can't just do the Great Apache Flaming Arrow Act. 27 00:04:52,440 --> 00:04:54,839 Didn't you tell him to use the gopher snake? 28... (1 Reply)
Discussion started by: thailand
1 Replies

8. Shell Programming and Scripting

Join multiple lines

Hi I have a source file ( written i C ) where a funtion call is spread over multiple lines, for example : func( a, b, c ); I want this to be joined into one single line : func(a,b,c); How can this be done with awk and sed ? Regards. Hench (2 Replies)
Discussion started by: hench
2 Replies

9. UNIX for Dummies Questions & Answers

Join lines in a file????

Hello UNIX gurus, I am new to the world of UNIX. Hopefully I am submitting my question at the right forum. Here is my dilemma - I have a file with contents like this - "line1","Hello","World","Today is a wonderful day","yes it is" "line2","Hello","World","Today is a beautiful day","oh... (8 Replies)
Discussion started by: foolishbar
8 Replies

10. Shell Programming and Scripting

Join Lines

Hi how do I join files like below in script. Thanks, Ashan there are may line like this in the file. zone name DR_TMP_A_sev1_3eA vsan 200 pwwn 50:00:09:73:f0:16:35:08 pwwn c0:50:76:08:6e:dc:00:16 zone name DR_TMP_A_SVR2_3eA vsan 200 pwwn 50:00:09:73:f0:16:35:08 pwwn... (4 Replies)
Discussion started by: ashanabey
4 Replies
iowatcher(1)						      General Commands Manual						      iowatcher(1)

NAME
iowatcher - Create visualizations from blktrace results SYNOPSIS
iowatcher OPTIONS... DESCRIPTION
iowatcher graphs the results of a blktrace run. It can graph the result of an existing blktrace, start a new blktrace, or start a new blk- trace and a benchmark run. It can then create an image or movie of the IO from a given trace. iowatcher can produce either SVG files or movies in mp4 format (with ffmpeg) or ogg format (with png2theora). OPTIONS
--help Print a brief usage summary. -d, --device <device> Controls which device you are tracing. You can only trace one device at a time for now. It is sent directly to blktrace, and only needed when you are making a new trace. -D, --blktrace-destination <destination> Destination for blktrace. -p, --prog <program> Program to run while blktrace is run. -K, --keep-movie-svgs Keep the SVG files generated for movie mode. -t, --trace <file|directory> Controls the name of the blktrace file. iowatcher uses a dump from blkparse, so -t tries to guess the name of the corresponding per CPU blktrace data files if the dump file doesn't already exist. If you want more than one trace in a given graph, you can specify -t more than once. If a directory is specified, iowatcher will use the name of the directory as the base name of the dump file and all trace files found inside the directory will be processed. -l, --label <label> Sets a label in the graph for a trace file. The labels are added in the same order the trace files are added. -m, --movie [spindle|rect] Create a movie. The file format depends on the extension used in the -o filename.* option. If you specify an .ogv or .ogg exten- sion, the result will be Ogg Theora video, if png2theora is available. If you use an .mp4 extension, the result will be an mp4 video if ffmpeg is available. You can use any other extension, but the end result will be an mp4. You can use --movie=spindle or --movie=rect, which changes the style of the IO mapping. -T, --title <title> Set a title to be placed at the top of the graph. -o, --output <file> Output filename (default: trace.svg). -r, --rolling <seconds> Control the duration for the rolling average. iowatcher tries to smooth out bumpy graphs by averaging the current second with sec- onds from the past. Larger numbers here give you flatter graphs. -h, --height <height> Set the height of each graph -w, --width <width> Set the width of each graph -c, --columns <columns> Numbers of columns in graph output -x, --xzoom <min:max> Limit processed time range to min:max -y, --yzoom <min:max> Limit processed sectors to min:max -a, --io-plot-action <action> Plot given action (one of Q,D,C) in IO graph -P, --per-process-io Distinguish between processes in IO graph -O, --only-graph <graph> Add a single graph to the output (see GRAPHS). By default all the graphs are included, but with -O you get only the graphs you ask for. -O may be used more than once. -N, --no-graph <type> Remove a single graph from the output (see GRAPHS). This may also be used more than once. GRAPHS
Choices for -O and -N are: io, tput, latency, queue_depth, iops, cpu-sys, cpu-io, cpu-irq, cpu-user, cpu-soft EXAMPLES
Generate graph from the existing trace.dump: iowatcher -t trace.dump -o trace.svg Skip the IO graph: iowatcher -t trace.dump -o trace.svg -N io Only graph tput and latency: iowatcher -t trace.dump -o trace.svg -O tput -O latency Generate a graph from two runs, and label them: iowatcher -t ext4.dump -t xfs.dump -l Ext4 -l XFS -o trace.svg Run a fio benchmark and store the trace in trace.dump, add a title to the top, use /dev/sda for blktrace: iowatcher -d /dev/sda -t trace.dump -T 'Fio Benchmark' -p 'fio some_job_file' Make a movie from an existing trace: iowatcher -t trace --movie -o trace.mp4 iowatcher(1)
All times are GMT -4. The time now is 10:03 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy