Script to find duplicates in a row and combine the data in specific column
Looking for a script to find duplicates in a line like below...
"VM1', 'VM', 'LDEV', 'LDEV1', 'LDEV2', 'LDEV3', 'LDEV4', 'LDEV5', 'LDEV6 '.
'VM', 'VI-SVC-VM001', "0000ef ', ' '," "," "," "," ""
'VM', 'VI-SVC-VM001', "0000de ', ' '," "," "," "," ""
'VM', 'VI-SVC-VM002', "0000df ', ' '," "," "," "," ""
'VM', 'VI-SVC-VM002', "0000f0 ', ' '," "," "," "," ""
.. .and manipulate the data in the following:
"VM1', 'VM', 'LDEV', 'LDEV1', 'LDEV2', 'LDEV3', 'LDEV4', 'LDEV5', 'LDEV6 '.
"" 'VM', 'VI-SVC-VM001', '0000ef', "0000de ', ' ', ' '," "," ""
"" 'VM', 'VI-SVC-VM002', '0000df', "0000f0 ', ' ', ' '," "," ""
(Note: VM VI-SVC-VM001 object has two LDEVs him assigned 0000ef and 0000de)
There may be two, three, or n LDEVs attributed to each VM object. I guess I have to build a table and the "join-collections" script can't cut it on this one.
I have the process to follow, I just need to put it in a loop (note, data already sorted on the virtual computer object):
1 import-csv
2. read each line, matched VM object, copy each found LDEV and place it in the next LDEV along
3. remove the duplicate line
4. rinse, repeat until the end
Thank you.
It's a solution pleasant Luc. I didn't use the Group-Object cmdlet to solve this problem.
Now I can go to sleep without having to worry about this problem more.
Tags: VMware
Similar Questions
-
Hi Experts,
JDeveloper 12.1.3.0.0
I have a VO based on entity object. With a column of the VO is transient attribute (I created).
I need to call a stored procedure for each row in the transitional attribute and display the data in the form of af: table. As well as other attributes.
So can anyone suggest how can I achieve this?
Thank you
AR
I think that you need a stored function (which returns the value) in this case, is not?
Take a look at:
https://docs.Oracle.com/CD/B31017_01/Web.1013/b25947/bcadvgen005.htm
and search for:
Invoking stored function with only Arguments in
call your function in the Get attribute and return value accessor...
-
Barcode Excel and read the data
Hello
I'm creating a program where I would like to scan a barcode in LV and there LV scan a spreadsheet excel for this barcode and returns the data in this row. I found an example online that allows the discovery of bar code number in excel, but I'm not coming with a strange issue when you try to view the information in this row. My program is the correct barcode in all cases. Only when I get the number of rank 1 line information will be correct. When I enter the information in row 2 lets say it shows the information of line 3. When I enter the tier 3 program line 5 information display. Attached is my draft of the code (this is my first stab at ActiveX control so bear with it please) and a worksheet example I created with some information on how the program works. I have checked the other posts for similar problems and could not find one this hepls with my particular issue. I also checked the thread specific excel but found no link to the code that can help. Any help is appreciated. IM thinking that I'm more looking for something, but since this is my first shot at this type of programming im not very well what it is. Thanks in advance for any information.
NYC says:
The other thread is not VI or Excel.
I'm curious to know what is happening in the VI, but I can't open it.
It's the same question, except that this time the OP has provided a follow-up saying: ' OK, here's what I got, and it does. ' " Why? "I would have just kept in this thread. No matter what.
In any case your mistake is that you don't want to connect the line found on all of the methods of Range.Item (get). You must connect a constant of 1 for 'Row' parameters for these two. As you operate on a found range, you don't want to change the line.
As it is now your VI does not close Excel when finished. The Excel process continues to run in the background. See the example with LabVIEW, which closes Excel when finished.
-
I have data to the basic generic text file format that must be converted into Excel spreadsheet format. The data are much longer than 65536 rows and in my code, I was not able to find a way to see the data in the next column. Currently, the conversion is done manually and generates an Excel file which has a total of 30-40 complete columns of data. Any suggestions would be greatly appreciated.
Thank you
Darrick
Here is a possible solution to the (potential) problem. Convert an array of strings and erase the data before writing to the file
-
Add dynamic buttons to each line of the report and bind the data line to this line-specific buttons
I have a page with a form in the upper part and a report at the bottom that is bound to a table. I need to add a pair of buttons for each row in the table and add dynamic actions for these buttons. I need to submit the data corresponding to the line to a REST service and update the table/line. I know that it is possible to add ajax call and refresh the table after receipt of the response. But I don't know how can I dynamically include a pair of buttons on each line and access the data corresponding to the record when a particular button is clicked. I was not able to find such a feature using the help page. Can you please let me know if this is possible. Thanks in advance.
Here is the representation of how I need to the page to look like.
Col 1
Col 2
Col 3
data 1
data 21
data 31
Button 1
Button 2
data 2
data 22
data 32
Button 1
Button 2
data 3
data 23
data 33
Button 1
Button 2
data 4
data 24
data 34
Button 1
Button 2
I should be able to access the data 1, data21, data button 31 11 and button21 etc.
Select data1,
data2,
data3,
......,
Button1 null,
Button2 null,
ROWID r_id
Of...
If you change the column for button1 and navigate to the area of column formatting you can create your button here, in several different ways. You will need to play with the way you prefer. See below:
-
How to transfer pictures from iphone to PC and keep the date, time and place
How to transfer pictures from iphone to PC and keep the date, time and place
Hello Grumpelfuerer,
Thank you for using communities of Apple Support.
If I understand your message that you want to import your photos from your iPhone 6 s, as well as for your Windows PC. I would like to save my photos on my computer as well. There are two ways to do this. You can use the iCloud photo library allowing to synchronize photos between your devices or import your photos to your PC using Windows Photo Gallery. This article will provide you with the steps that you can use for both options:
Import photos and videos from your iPhone, iPad or iPod touch
Best regards
-
In what concerns the transfer of data from a PC to a MAC, my wife and I have laptops and we want to combine the data both on a Mac. Including two Itunes accounts. This is possible by using the migration on each PC asst?
You can bind the whole apple ID using family sharing. If you have trouble doing this, you can go to the apple store, and they would be happy to help you.
-
How can I enter BIOS compaq610 screen and set the date, time
How can I enter BIOS compaq610 screen and set the date, time
Hello
See Page 94 or Page 100 (according to what's relevant) of your & Maintenance Guide.
Kind regards
DP - K
-
Search a directory of data and display the data that is within the range of dates
Hello
I have a full idrectory of data from overtime, and I think of search in the directory and display the data files for specific dates. I only started this encoding yet but I figure I'll take the brain of some SMEs here labview and start in the right direction. My goal is to go through a comprehensive directory of data taken for a month or MORE csv files and select the data to process and display office files the date of its registration. If I take the data of last week, last month or last minute, it should just treat as an exact or more.
Please help me get started on the right foot
End date will be probably greater than the start date, right? So, end date must connect at the entrance to the upper limit. Then wire in the range? to the conditional terminal of a tunnel of conditional indexation.
Lynn
-
I have a laptop Windows 8 . I want to connect to a new round of windows 7 and transfer the data at least 8 MB/s.
Please send me the procedure to follow. I don't want to share Internet, but want to transfer data.You can do this, but you need a special type of Ethernet cable called a crossover cable. This means the son in the swap position cables so that "send" and "receive" the computer two plugs can communicate.
Learn more here: http://windows.microsoft.com/en-us/windows/connect-two-computers-crossover-cable#1TC=windows-7
-
My laptop broke down (motherboard, Gone) and is not repairable. The technician took my hard MovieFrame and there is a very important document that I need very badly. I bought a proper case and connected my hard drive to another laptop but unfortunately no data can be found, nor my hard drives are detectable? I am very depressed and need the data. Please helllllllllllllllllllllllllllllllllllllllllllppppppp
Hi Adel Bushager,
I suggest you contact the store local tech or the manufacturer of the system to help with recovery of data from the hard drive.
Hope this information is useful.
-
Want to access a SOAP service and display the data in the external list
Hello
I could see a WCF Service via the type of external content successfully. Now I want to access a SOAP Service and display the data in an external list in Sharepoint 2010. I am able to create a data source with success with the SOAP service, but how to display the data in the external list as external list uses only as data sources for external content types.
Also with WCF as external content type, it is only on WCF services or any kind of web services can be added as an external content type.
Any help would be appreciated.
Thanks in advance
Hello sunny198218,
The question you have posted is related to Windows Communication Foundation Service and would be better suited in the MSDN forum for category Windows Communication Foundation. I've included a link to the forum where you can ask your question.
http://social.msdn.Microsoft.com/forums/en-us/WCF/threadsSincerely,
Marilyn
-
How to move the MSWMM files and keep the data on my computer?
I downloaded digital film from my camera to a destination on my D drive as a file MSWMM (collections), and whenever I try to move the downloaded film (collection), it does not recognize the movie more.
How to move the MSWMM files and keep the data on my computer?
The mswmm file is the project file, not a video.
Think of it as a recipe for a cake, it only tells you what to do with the ingredients, but does not include the ingredients.
The mswmm file tells the computer to look in a certain folder to use a video or audio file.
If you move the file, then MM knows not where is the file, then you must tell it, by right clicking on a red x on the timeline and then choose search for the file. -
should which product I buy to be able to save and send the data entered in a form?
Hello, should what product I buy to be able to save and send the data entered in a form?
Hi clarka14179614,
If you are referring to record and send after filling out a form, you can either use an Adobe Reader or Acrobat application.
Adobe Reader is a free service and you can install it here: Adobe - Adobe Acrobat Reader DC Distribution
Let us know if you need additional assistance.
Kind regards
Meenakshi
-
I buy the Adobe Creative cloud and paid, but when I downloaded and set (photoshop CC), he still appeared "is the evaluation version and cross the date limit.
Hello
You can also see Cloud Creative applications back in test mode after an update until 2015 for CC
Hope that helps!
Kind regards
Sheena
Maybe you are looking for
-
I was doing a pop-up for months now telling me to spend at least to Snow Leopard. I finally made the leap to Snow Leopard, and I can always download the latest version of Firefox. In addition, I no longer can I play movies on Netflix. Just get a blac
-
WLAN driver for Satellite L300-11V
Just bought a Satellite L300-11V of curries and can t it to connect wireless in the House. My old laptop does it perfectly. I just searched in Google and it seems Toshiba were portable computers shipping without the appropriate drivers installed.Can
-
I can be on my laptop and the internet works fine, but if I close my laptop and come back, sometimes it will not open a session. When I try to connect to a wireless network, it will appear not all networks at all and I live in a condo and I usually p
-
BlackBerry Smartphones that I want to change my default browser.
My browser when I use the icon of the default screen after switching to a new contract with Orange and receive a new Bold 9000, Blackberry. On my old 8700, the default value of the browser was Orange World and that's what I prefer to use. I can acc
-
re - setter Netbook hp mini 110
Nice day.. I have a mini netbook 110 HP, but my problem is that they have a password and I didn't know what is the password... is there a re-setter password fo this? Help me please... Unit: netbook computer hp mini 110 S / N:CNU942226R