Sponsored Content
Top Forums Shell Programming and Scripting how to display column value in a row with space as delimeter Post 302434709 by guruprasadpr on Monday 5th of July 2010 01:39:10 AM
Old 07-05-2010
Hi
Are you looking for something like this:

Code:
$ ps | awk '/runflow/{print "kill -9 ", $1}'
kill -9  1234
kill -9  2341
kill -9  12673

This output can be copied to a file, and you can run the file or you can run the command itself in backticks.

Guru.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How do you represent a field delimeter that is a space???

you know like if you want to work on a specified field in the password file. you would specify the field your interested in my telling the script that the fields are separated by a colon. now, my problem is that I want to specify a field that is not separated by a colon but by a space or tab... (1 Reply)
Discussion started by: TRUEST
1 Replies

2. Shell Programming and Scripting

Changing the column for a row in a text file and adding another row

Hi, I want to write a shell script which increments a particular column in a row from a text file and then adds another row below the current row with the incremented value . For Eg . if the input file has a row : abc xyz lmn 89 lm nk o p I would like the script to create something like... (9 Replies)
Discussion started by: aYankeeFan
9 Replies

3. UNIX for Dummies Questions & Answers

display column in a row

how can i display every column in a row individually........ i vauguely remmeber something like echo $1 $2 etc.......but i dont remmeber properly......so is there anything like that? i tried searching but wasnt able to find...... thanks and regards vivek.s (2 Replies)
Discussion started by: vivekshankar
2 Replies

4. Shell Programming and Scripting

Moving data from a specified column/row to another column/row

Hello, I have an input file like the following: 11_3_4 2_1_35 3_15__ _16989 Where '_' is a space. The data is in a table. Is there a way for the program to prompt the user for x1,y1 and x2,y2, where x1,y1 is the desired number (for example x=6 y=4 is a value of 4) and move to a desired spot... (2 Replies)
Discussion started by: jl487
2 Replies

5. Shell Programming and Scripting

Count the delimeter from a file and delete the row if delimeter count doesnt match.

I have a file containing about 5 million rows, in the file there are some records which has extra delimiter at random position. (we dont know the positions), now we have to Count the delimeter from each row and if the count of delimeter is not matching then I want to delete those rows from the... (5 Replies)
Discussion started by: Akumar1
5 Replies

6. UNIX for Dummies Questions & Answers

How do you delete cells from a space delimited text file given row and column number?

How do you delete cells from a space delimited text file given row and column number? Letś say the row number is r and the column number is c. Thanks! (5 Replies)
Discussion started by: evelibertine
5 Replies

7. Shell Programming and Scripting

Subtracting each row from the first row in a single column file using awk

Hi Friends, I have a single column data like below. 1 2 3 4 5 I need the output like below. 0 1 2 3 4 where each row (including first row) subtracting from first row and the result should print below like the way shown in output file. Thanks Sid (11 Replies)
Discussion started by: ks_reddy
11 Replies

8. Shell Programming and Scripting

how to remove tab space only in the column of a specific row

Hi, I need help to remove tab delimited space in the $2 of a specific row. My file is like this:- file1.txt No_1 4 139 156 No_1 5 161 205 No_4 91 227 212 No_19 254 243 263 No_19 645 249 258 No_19 101 2492 2635 No_90 8 277 288... (5 Replies)
Discussion started by: redse171
5 Replies

9. UNIX for Dummies Questions & Answers

awk to print first row with forth column and last row with fifth column in each file

file with this content awk 'NR==1 {print $4} && NR==2 {print $5}' file The error is shown with syntax error; what can be done (4 Replies)
Discussion started by: cdfd123
4 Replies

10. Shell Programming and Scripting

Replace space and tab to pipe delimeter

I have file like below abc 12 34 45 code abcdef 451 1 4 code ghtyggg 4 56 3 code I need to change this to abc|12|34|45|code| abcdef|451|1|4|code| ghtyggg|4|56|3|code| I tried replace space with | in sed ... but in the middle some row has... (7 Replies)
Discussion started by: greenworld123
7 Replies
XmButtonBox(3X) 														   XmButtonBox(3X)

NAME
The Button Box widget SYNOPSIS
#include <Xm/ButtonBox.h> DESCRIPTION
The Button Box widget manages children (usually buttons) in a single row or single column layout. The Button Box maintains equal spacing between its children at all times and attempts to adjust its height and width as necessary so that all children will fit. If this is not possible, due to parent or application programmer constraints, the Button Box will resize its chil- dren as necessary to fit within the available space. Note: in what follows, major direction refers to the direction of orientation, and minor direction refers to the perpendicular direction. Normal Resources Name Class Type Initial Value equalSize EqualSize Boolean False fillOption FillOption unsigned char XmFillNone marginHeight Margin VerticalDimension 0 marginWidth Margin HorizontalDimension 0 orientation Orientation unsigned char XmHORIZONTAL All resource names begin with XmN and all resource class names begin with XmC. equalSize Specifies whether the children are to be maintained with equal sized heights and widths. The chosen height and width for the children is found by asking each child for its preferred size and taking the largest value in each direction. fillOption Specifies how to use any extra space left over once all children have been sized according to either their preference or equalSize. There are four options: XmFillNone No automatic filling is performed. Center the children in the minor direction and place the children with equal padding between them in the major direction. XmFillMinor Place the children with equal padding between them in the major direction, but force all the children to take on the Button Box minor dimension as their minor direction. XmFillMajor Center the children in the minor direction, but expand all the children in their major direction so that there is no padding between them. Expand the children such that their relative sizes remain constant. XmFillAll This option combines the placement actions and sizing actions of XmFillMinor and XmFillMajor. Regardless of the fill mode, the ButtonBox widget will always leave the specified margin between its edge and the nearest child. A new String to fillOption resource converter has been registered to convert the following strings to fill options: "none", "major", "minor", "all." This resource can therefore be set in an application defaults file. marginHeight marginWidth Specifies the number of pixels to use as a margin around the entire group of children. The marginHeight value applies to both the top and bottom margins, while the marginWidth applies to the left and right margins. orientation Specifies whether children are to be placed in a row or a column. The orientation may be either XmHORIZONTAL or XmVERTICAL. If the orienta- tion is XmHORIZONTAL, the children are placed in a row with the major dimension being width and the minor dimension being height. If the value is XmVERTICAL, the children are placed in a column with the major dimension being height and the minor dimension being width. The default value is XmHORIZONTAL. Convenience Routines XmCreateButtonBox XmCreateButtonBox( Widget parent, /* Widget id of parent for new ButtonBox */ String name, /* Name of the created widget */ ArgList args, /* argument list */ Cardinal num_args /* number of items in argument list */ ) Translations and Actions: The Button Box manager inherits all of its translations and actions from its superclass. COPYRIGHT
Copyright (c) 1992 by Integrated Computer Solutions, Inc. XmButtonBox(3X)
All times are GMT -4. The time now is 10:17 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy