Sponsored Content
Full Discussion: Data Manipulation
Top Forums UNIX for Dummies Questions & Answers Data Manipulation Post 302887987 by radius on Wednesday 12th of February 2014 05:41:48 AM
Old 02-12-2014
Data Manipulation

Dear Sir,

I have file input

Code:
RGR001|108.28|-2.86489|100-120|RANGGAR
RGR002|108.071|-2.69028|80-100|RANNGAR
RGR003|108.168|-2.97053|50-80|RANNGAR
RGR007|108.192722222|-2.766138889|0-50|RANGGAR

I want to create files by joining each rows with each rows below

Output as below

Code:
RGR001|108.28|-2.86489|100-120|RANGGAR|RGR002|108.071|-2.69028|80-100|RANNGAR
RGR001|108.28|-2.86489|100-120|RANGGAR|RGR003|108.168|-2.97053|50-80|RANNGAR
RGR001|108.28|-2.86489|100-120|RANGGAR|RGR007|108.192722222|-2.766138889|0-50|RANGGAR
RGR002|108.071|-2.69028|80-100|RANNGAR|RGR003|108.168|-2.97053|50-80|RANNGAR
RGR002|108.071|-2.69028|80-100|RGR007|108.192722222|-2.766138889|0-50|RANGGAR
RGR003|108.168|-2.97053|50-80|RANNGAR|RGR007|108.192722222|-2.766138889|0-50|RANGGAR

Big Thanks
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

data manipulation script

I have a folder called {homedata} Within this folder there are 12 subfolders 200601.......200612 Within each subfolder there are 8 sets of files Each filename commences with A B C D E F G or H, so {filename}* can be used. I am trying to write a script which will from the top level go... (1 Reply)
Discussion started by: grinder182533
1 Replies

2. UNIX for Dummies Questions & Answers

Data Manipulation

Hello I am currently having problems in mapulating a certain file which contains vaious data. Belos is a sample content Event=<3190> Client IP=<151.111.11.143> DNS=<abc.sbc.com> TransCount=<139> Client IP=<150.222.133.163> DNS=<xyz.yuu.com> TransCount=<3734> Event=<3120> Client... (11 Replies)
Discussion started by: khestoi
11 Replies

3. Shell Programming and Scripting

Tricky data manipulation...

Hi everyone.. I am new here, hello.. I hope this doesn't come across to you folks as a stupid question, I'm somewhat new to scripting :) I'm seeking some help in finding a way to manipulate data output for every two characters - example: numbers.lst contains the following output:... (3 Replies)
Discussion started by: explicit
3 Replies

4. Shell Programming and Scripting

Data manipulation from a file

i have a file in follwing format 0110 1020 1011 1032 1020 2005 2003 1050 i want the output in such a way that all non zero numbers will be converted into 1 like this 0110 1010 1011 1011 1010 1001 1001 1010 (3 Replies)
Discussion started by: vaibhavkorde
3 Replies

5. UNIX for Dummies Questions & Answers

Script for data manipulation

Hi all! my first post here, so mods -- if this should ideally be in the scripts section, please move there. Thanks! I have data in the following format: key1:value1 key2:value2 key3:value3 A B C D key1:value4 key2:value5 key3:value6 A1 B1 key1: ... and so on I want an output... (2 Replies)
Discussion started by: gnat01
2 Replies

6. Shell Programming and Scripting

Help with data manipulation script

Y,T,,H05,6,6,0,0 -> TH05_6 D,5,BT,B -> BT_KIOSK P,KQC222 -> KQC222 G,B,2 -> BRANI_GATE_2 fileA TPM658 Y,T,,H05,6,6,0,0 TPM110 D,5,BT,B TPM136 P,KQC222 TPM180 P,BQC913 TPM575 Y,B,,T05,14,14,0,0 IPM760 G,B,2 TPM011 I need to use second column $1,$2,$3,$4..... if first char... (6 Replies)
Discussion started by: ment0smintz
6 Replies

7. Shell Programming and Scripting

Data manipulation using shell

Dear all I have a dataset (in text format,delimited by tab) which have 100 variables (say, var0-var99) and more than 100,000 observations. I want to do the following: 1. for variable var0-var49, I want to add "00" in front of each data (for example, "1" would become "001") 2. for variable... (8 Replies)
Discussion started by: littlewenwen
8 Replies

8. UNIX for Dummies Questions & Answers

Data manipulation

Hallo Team, I need to manipulate existing data file. Have a look at current data and expected data: Current Data: 27873517141 27873540000 27873515109 27873517140 27873540001 27873540000 27873501343 27873540000 27873517140 27873511292 27873645989 27873540000 27873540000... (7 Replies)
Discussion started by: kekanap
7 Replies

9. Shell Programming and Scripting

[Solved] Data manipulation

Hallo Team, I need your help. I have a file that has two colums. See sample below: 105550 0.28 105550 0.24 125550 0.28 125550 0.24 215650 0.28 215650 0.24 315550 0.28 315550 0.24 335550 0.28 335550 0.24 40555 0.21 40555 0.17 415550 0.21 415550 0.17 43555 0.21 43555 0.17 (5 Replies)
Discussion started by: kekanap
5 Replies

10. Shell Programming and Scripting

Data manipulation, Please help..

Hello, I have a huge set of data that needs to be reformatted. Here is a simple example to explain the process. I have number n=5 and a input with many numbers separated with comma: ... (11 Replies)
Discussion started by: liuzhencc
11 Replies
PTS_CREATEUSER(1)					       AFS Command Reference						 PTS_CREATEUSER(1)

NAME
pts_createuser - Creates a user or machine entry in the Protection Database SYNOPSIS
pts createuser -name <user name>+ [-id <user id>+] [-cell <cell name>] [-noauth] [-localauth] [-force] [-help] pts createu -na <user name>+ [-i <user id>+] [-c <cell name>] [-no] [-l] [-f] [-h] pts cu -na <user name>+ [-i <user id>+] [-c <cell name>] [-no] [-l] [-f] [-h] DESCRIPTION
The pts createuser command creates an entry in the Protection Database for each user or machine specified by the -name argument. A user entry name becomes the user's AFS username (the one to provide when authenticating with the AFS Authentication Server). A machine entry's name is the machine's IP address or a wildcard notation that represents a range of consecutive IP addresses (a group of machines on the same network). It is not possible to authenticate as a machine, but a group to which a machine entry belongs can appear on a directory's access control list (ACL), thereby granting the indicated permissions to any user logged on to the machine. AFS user IDs (AFS UIDs) are positive integers and by default the Protection Server assigns an AFS UID that is one greater than the current value of the "max user id" counter in the Protection Database, incrementing the counter by one for each user. To assign a specific AFS UID, use the -id argument. If any of the specified AFS UIDs is greater than the current value of the "max user id" counter, the counter is reset to that value. It is acceptable to specify an AFS UID smaller than the current value of the counter, but the creation operation fails if an existing user or machine entry already has it. To display or set the value of the "max user id" counter, use the pts listmax or pts setmax command, respectively. The issuer of the pts createuser command is recorded as the entry's creator and the group system:administrators as its owner. CAUTIONS
The Protection Server reserves AFS UID 0 (zero) and returns an error if the -id argument has that value. OPTIONS
-name <user name>+ Specifies either a username for a user entry, or an IP address (complete or wildcarded) for a machine entry: o A username can include up to 63 numbers and lowercase letters, but it is best to make it shorter than eight characters, because many application programs cannot handle longer names. Also, it is best not to include shell metacharacters or other punctuation marks. In particular, the colon (":") and at-sign ("@") characters are not acceptable. The period is generally used only in special administrative names, to separate the username and an instance, as in the example "pat.admin". o A machine identifier is its IP address in dotted decimal notation (for example, 192.12.108.240), or a wildcard notation that represents a set of IP addresses (a group of machines on the same network). The following are acceptable wildcard formats. The letters "W", "X", "Y" and "Z" each represent an actual number from the range 1 through 255. o W.X.Y.Z represents a single machine, for example 192.12.108.240. o W.X.Y.0 matches all machines whose IP addresses start with the first three numbers. For example, 192.12.108.0 matches both 192.12.108.119 and 192.12.108.120, but does not match 192.12.105.144. o W.X.0.0 matches all machines whose IP addresses start with the first two numbers. For example, the address 192.12.0.0 matches both 192.12.106.23 and 192.12.108.120, but does not match 192.5.30.95. o W.0.0.0 matches all machines whose IP addresses start with the first number in the specified address. For example, the address 192.0.0.0 matches both 192.5.30.95 and 192.12.108.120, but does not match 138.255.63.52. Do not define a machine entry with the name 0.0.0.0 to match every machine. The system:anyuser group is equivalent. -id <user id>+ Specifies an AFS UID for each user or machine entry, rather than allowing the Protection Server to assign it. Provide a positive integer. If this argument is used and the -name argument names multiple new entries, it is best to provide an equivalent number of AFS UIDs. The first UID is assigned to the first entry, the second to the second entry, and so on. If there are fewer UIDs than entries, the Protection Server assigns UIDs to the unmatched entries based on the "max user id" counter. If there are more UIDs than entries, the excess UIDs are ignored. If any of the UIDs is greater than the current value of the "max user id" counter, the counter is reset to that value. -cell <cell name> Names the cell in which to run the command. For more details, see pts(1). -force Enables the command to continue executing as far as possible when errors or other problems occur, rather than halting execution at the first error. -help Prints the online help for this command. All other valid options are ignored. -localauth Constructs a server ticket using a key from the local /etc/openafs/server/KeyFile file. Do not combine this flag with the -cell or -noauth options. For more details, see pts(1). -noauth Assigns the unprivileged identity anonymous to the issuer. For more details, see pts(1). OUTPUT
The command generates the following string to confirm creation of each user: User <name> has id <id> EXAMPLES
The following example creates a Protection Database entry for the user "johnson". % pts createuser -name johnson The following example creates three wildcarded machine entries in the ABC Corporation cell. The three entries encompass all of the machines on the company's networks without including machines on other networks: % pts createuser -name 138.255.0.0 192.12.105.0 192.12.106.0 PRIVILEGE REQUIRED
The issuer must belong to the system:administrators group. SEE ALSO
pts(1), pts_listmax(1), pts_setmax(1) COPYRIGHT
IBM Corporation 2000. <http://www.ibm.com/> All Rights Reserved. This documentation is covered by the IBM Public License Version 1.0. It was converted from HTML to POD by software written by Chas Williams and Russ Allbery, based on work by Alf Wachsmann and Elizabeth Cassell. OpenAFS 2014-04-08 PTS_CREATEUSER(1)
All times are GMT -4. The time now is 04:51 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy