Sponsored Content
Top Forums Shell Programming and Scripting Vlookup using Ask from specific column shell script Post 303008166 by ranjancom2000 on Tuesday 28th of November 2017 05:40:39 AM
Old 11-28-2017
Hi Yoda,

Thanks it working great. It it possible to add notfound device as "dummy" before the device.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Insert a text from a specific row into a specific column using SED or AWK

Hi, I am having trouble converting a text file. I have been working for this whole day now, still i couldn't make it. Here is how the text file looks: _______________________________________________________ DEVICE STATUS INFORMATION FOR LOCATION 1: OPER STATES: Disabled E:Enabled ... (5 Replies)
Discussion started by: Issemael
5 Replies

2. Shell Programming and Scripting

Creating Report file with 'vlookup' kind of structure in shell

Hi, I have some files in the following structure. File_a.txt Field_1 Pass Field_2 Pass Field_3 Pass File_b.txt Field_1 Pass Field_2 Fail Field_3 Pass File_c.txt Field_1 Fail Field_2 Pass Field_3 Pass (2 Replies)
Discussion started by: vikaskm
2 Replies

3. Shell Programming and Scripting

Assigning a specific format to a specific column in a text file using awk and printf

Hi, I have the following text file: 8 T1mapping_flip02 ok 128 108 30 1 665000-000008-000001.dcm 9 T1mapping_flip05 ok 128 108 30 1 665000-000009-000001.dcm 10 T1mapping_flip10 ok 128 108 30 1 665000-000010-000001.dcm 11 T1mapping_flip15 ok 128 108 30... (2 Replies)
Discussion started by: goodbenito
2 Replies

4. Shell Programming and Scripting

KSH Script to Execute command from specific column in file

Hi Unix Experts,Team I have a file (say comand_file.prm), The file has a command specified in column 6 (say "./execute_script.sh"). I want to execute this command in my script. I am writing a KSH script to achieve this. Could you please assist me with this. (6 Replies)
Discussion started by: Jeevanm
6 Replies

5. Shell Programming and Scripting

Shell Scripting Vlookup

I am developing shell script on Linux OS and I have two files.Data in each file is like : File1 : A B C E F G X Y Z File 2: A C 12 E G 22 X Z 41 I need if first and third column entries ( $1 & $3) of File1 in same row matches with first & second column... (3 Replies)
Discussion started by: suneet17
3 Replies

6. Shell Programming and Scripting

Overwrite specific column in xml file with the specific column from adjacent line

I have an xml file dumped from rrd file, that I want to "patch" so the xml file doesn't contain any blank hole in the resulting graph of the rrd file. Here is the file. <!-- 2015-10-12 14:00:00 WIB / 1444633200 --> <row><v> 4.0419731265e+07 </v><v> 4.5045912770e+06... (2 Replies)
Discussion started by: rk4k
2 Replies

7. Shell Programming and Scripting

Vlookup using Ask from specific column from two files

File1 alias:server1_00,20:f1:0a:25:b5:03:02:90 alias:server2_00,20:f1:0a:25:b5:03:02:91 alias:server3_00,50:00:09:75:50:0d:bd:da alias:server4_00,20:f1:0a:25:b5:03:02:93 alias:server5_00,21:00:00:24:ff:8b:e1:fe alias:server6_00,50:00:09:75:50:08:54:44... (17 Replies)
Discussion started by: ranjancom2000
17 Replies

8. Shell Programming and Scripting

Need awk or Shell script to compare Column-1 of two different CSV files and print if column-1 matche

Example: I have files in below format file 1: zxc,133,joe@example.com cst,222,xyz@example1.com File 2 Contains: hxd hcd jws zxc cst File 1 has 50000 lines and file 2 has around 30000 lines : Expected Output has to be : hxd hcd jws (5 Replies)
Discussion started by: TestPractice
5 Replies

9. UNIX for Beginners Questions & Answers

How to insert data into black column( Secound Column ) in excel (.XLSX) file using shell script?

Source Code of the original script is down below please run the script and try to solve this problem this is my data and I want it column wise 2019-03-20 13:00:00:000 2019-03-20 15:00:00:000 1 Operating System LAB 0 1 1 1 1 1 1 1 1 1 0 1 (5 Replies)
Discussion started by: Shubham1182
5 Replies

10. Shell Programming and Scripting

Using awk to change a specific column and in a specific row

I am trying to change the number in bold to 2400 01,000300032,193631306,190619,0640,1,80,,2/ 02,193631306,000300032,1,190618,0640,CAD,2/ I'm not sure if sed or awk is the answer. I was going to use sed and do a character count up to that point, but that column directly before 0640 might... (8 Replies)
Discussion started by: juggernautjoee
8 Replies
putdgrp(1M)						  System Administration Commands					       putdgrp(1M)

NAME
putdgrp - edits device group table SYNOPSIS
putdgrp [-d] dgroup [device...] DESCRIPTION
putdgrp modifies the device group table. It performs two kinds of modification. It can modify the table by creating a new device group or removing a device group. It can also change group definitions by adding or removing a device from the group definition. When the command is invoked with only a dgroup specification, the command adds the specified group name to the device group table if it does not already exist. If the -d option is also used with only the dgroup specification, the command deletes the group from the table. When the command is invoked with both a dgroup and a device specification, it adds the given device name(s) to the group definition. When invoked with both arguments and the -d option, the command deletes the device name(s) from the group definition. When the command is invoked with both a dgroup and a device specification and the device group does not exist, it creates the group and adds the specified devices to that new group. OPTIONS
The following options are supported: -d Delete the group or, if used with device, delete the device from a group definition. OPERANDS
The following operands are supported: dgroup Specify a device group name. device Specify the pathname or alias of the device that is to be added to, or deleted from, the device group. EXIT STATUS
The following exit values are returned: 0 Successful completion. 1 Command syntax was incorrect, an invalid option was used, or an internal error occurred. 2 Device group table could not be opened for reading or a new device group table could not be created. 3 If executed with the -d option, indicates that an entry in the device group table for the device group dgroup does not exist and so cannot be deleted. Otherwise, indicates that the device group dgroup already exists and cannot be added. 4 If executed with the -d option, indicates that the device group dgroup does not have as members one or more of the specified devices. Otherwise, indicates that the device group dgroup already has one or more of the specified devices as members. EXAMPLES
Example 1: Adding a new device group. The following example adds a new device group: example# putdgrp floppies Example 2: Adding a device to a device group. The following example adds a device to a device group: example# putdgrp floppies diskette2 Example 3: Deleting a device group. The following example deletes a device group: example# putdgrp -d floppies Example 4: Deleting a device from a device group. The following example deletes a device from a device group: example# putdgrp -d floppies diskette2 FILES
/etc/dgroup.tab ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ SEE ALSO
listdgrp(1M), putdev(1M), attributes(5) SunOS 5.10 5 Jul 1990 putdgrp(1M)
All times are GMT -4. The time now is 04:16 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy