Sponsored Content
Top Forums Shell Programming and Scripting Moving data from a specified column/row to another column/row Post 302427343 by jl487 on Friday 4th of June 2010 05:56:46 PM
Old 06-04-2010
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 (x2,y2).

In this example, if (x1=6 y1=4) and (x2=3 y2=1), then the new table will be:
1193_4
2_1_35
3_15__
_1698_
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Move data from Column to Row

Hi all, I have a file with several columns of data, eg: A B C D 1 2 5 1 2 2 2 2 8 4 4 4 4 2 3 4 10 9 4 4 9 7 1 2 I need to get the values from, say, column B and place them into a string separated by a semicolon, eg: 2;2;4;2;9;7 Does... (4 Replies)
Discussion started by: danhodges99
4 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. Shell Programming and Scripting

row to column and position data in to fixed column width

Dear friends, Below is my program and current output. I wish to have 3 or 4 column output in order to accomodate in single page. i do have subsequent command to process after user enter the number. Program COUNT=1 for MYDIR in `ls /` do VOBS=${MYDIR} echo "${COUNT}. ${MYDIR}" ... (4 Replies)
Discussion started by: baluchen
4 Replies

4. Shell Programming and Scripting

Filter and migrate data from row to column

Hello Experts, I am new in scripting. I would like to filter and migrate data from row to column by awk. Thanks in advance. For example FileA abc 1 2 3 Xyz3 4 1 5 bcd1 Output : Abc 1 2 3 Xyz3 4 1 5 bcd1 3 5 6 (5 Replies)
Discussion started by: shah09
5 Replies

5. Shell Programming and Scripting

Sort data from column to row

Hi, I need somebody's help with sorting data with awk. I've got a file: 10 aaa 4584 12 bbb 6138 20 ccc 4417 21 ddd 7796 10 eee 7484 12 fff ... (5 Replies)
Discussion started by: killerbee
5 Replies

6. 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

7. 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

8. Shell Programming and Scripting

Convert Data from Column to Row

Hi FileA.txt E_TIM 16, ETE 15, EOND 26, EEC 81, E_1 un, E_2 un, E_3 un, E_4 284, E_TIM 17, ETE 15, EOND 29, EEC 82, E_1 un, E_2 un, E_3 un, E_4 249, (6 Replies)
Discussion started by: asavaliya
6 Replies

9. Shell Programming and Scripting

Replace First Column and First Row Data

HI Guys, I just want to replace data for First Column and Row Cell(1,1) Input :- Hello A B C X 1 2 3 Y 4 5 6 Z 7 8 9 Output:- Byee A B C X 1 2 3 Y 4 5 6 Z 7 8 9 From Hello to Byee .....And The Each file have Different String. (3 Replies)
Discussion started by: pareshkp
3 Replies

10. Shell Programming and Scripting

Column to Row Data.

HI Guys, I have below Input :- X L1 5 Y L1 10 Z L1 15 X L2 20 Y L2 12 Z L2 15 X L3 100 Y L3 Z L3 300 Output:- ID L1 L2 L3 X 5 10 15 Y 20 12 15 Z 100 Null 300 (11 Replies)
Discussion started by: pareshkp
11 Replies
XHPAcknowledge(3X)														XHPAcknowledge(3X)

NAME
XHPAcknowledge - Send an Acknowledge to an extended input device. SYNOPSIS
#include <X11/XHPlib.h> int XHPAcknowledge (display, deviceid, acknowledge) Display *display; XID deviceid; int acknowledge; ARGUMENTS
display Specifies the connection to the X server. deviceid Specifies the ID of the desired device. acknowledge Specifies the acknowledge to be sent. Valid values are: GENERAL_ACKNOWLEDGE, ACKNOWLEDGE_1, ACKNOWLEDGE_2, ACKNOWLEDGE_3, ACKNOWLEDGE_4, ACKNOWLEDGE_5, ACKNOWLEDGE_6, ACKNOWLEDGE_7. DESCRIPTION
This request is part of an HP-proprietary extension to X. Its functionality has been superseded by the standard XChangeFeedbackControl request. You should use XChangeFeedbackControl instead of XHPAcknowledge if possible. This request sends an acknowledge to an input device. This allows a previously received prompt to be turned off. A prompt is an audio or visual indication that the program controlling the input device is ready for input. The LED on an HP46086A buttonbox is an example of a prompt. A program may indicate its status by turning on a prompt on the appropriate input device. Not all input devices support prompts and acknowledges. Any device that does support a particular prompt will also support the corresponding acknowledge. To determine whether an input device supports a particular prompt and acknowledge, the io_byte field of the XHPDeviceList structure should be examined. The format of this structure is described in the documentation for the XHPListInputDevices request. RETURN VALUE
none DIAGNOSTICS
BadDevice An invalid device ID was specified. BadValue An invalid acknowledge was specified. FILES
/usr/include/X11/XHPlib.h ORIGIN
Hewlett-Packard Company SEE ALSO
XHPListInputDevices(3x) XHPPrompt(3x) X Version 11 Release 5 XHPAcknowledge(3X)
All times are GMT -4. The time now is 02:49 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy