Sponsored Content
Top Forums Shell Programming and Scripting Change 10th column formatting. Post 303017470 by shekhar_4_u on Wednesday 16th of May 2018 12:36:45 PM
Old 05-16-2018
Change 10th column formatting.

Hi Experts,

I created a powershell script to fetch user details from active directory and export it to a csv/excel.

HTML Code:
"abc","bcd","devloper;admin"
"bcd","dca","tester;QA;admin"
So here user abc is member of devloper and admin group and user bcd is a member of tester,QA and admin group. I want a output for each group to which a user is a member of in separate rows. Groups are separated by semicolon.

something like this
HTML Code:
"abc","bcd","devloper"
"abc","bcd","admin"
"bcd","dca","tester"
"bcd","dca","QA"
"bcd","dca","admin"


Note: it is not necessary to write a PowerShell script for formatting. Basj, Python will also work.
Thanks in advance.

Last edited by shekhar_4_u; 05-16-2018 at 02:56 PM.. Reason: Change subject line
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Replace 10th column with a new column--- Terriblly hurry

Hi Can any one tell me how to replace the 10th column in a file(comma delimted) with a new file with a single column. Can any one Help me out of the please as soon as possible as i am in a terribley hurry!!!!!! Many THanks, (2 Replies)
Discussion started by: ahmedwaseem2000
2 Replies

2. UNIX for Dummies Questions & Answers

Change one column using sed??

Is there way to use sed to change only one occurence in a colon separated line? I would like to change a file from *:*:rex:rex *:*:simon:rex to *:*:rex:mabry *:*:simon:rex (2 Replies)
Discussion started by: rexmabry
2 Replies

3. Shell Programming and Scripting

Change names in a column based on the symbols in another column

If the 4th column has - sign then the names in 3rd column has to change to some user defined names (as shown in output). Thanx input1 1 a aaaaa + 2 b bbbbb + 3 c ccccc + 4 d ddddd + 5 e eeeee + 6 f xxxxx + 8 h hhhhh +... (8 Replies)
Discussion started by: repinementer
8 Replies

4. UNIX and Linux Applications

Replace string in unix from 10th column onwards

Hi All, I need to replace the last 19 bytes of the following string My_Org_Testing_20090102_231124.txt (Text_Date_Time.txt). I would like to derive the current time using "date +%Y%m%d_%H%M%S.txt" and replace the last 19 bytes of the above string I would appreciate if someone could... (3 Replies)
Discussion started by: rpk2008
3 Replies

5. Shell Programming and Scripting

(Formatting)new Column adding

Hi guys i have a variable called hostname which contains hostname of my machine. How would i add the hostname to output of other command . For eg. if a output of command is . command : xm list How would i add hostname column to it. My output should look like ... (1 Reply)
Discussion started by: pinga123
1 Replies

6. Shell Programming and Scripting

Change value in a column

Hello! Please could anyone help me in writing a code to modify the value in column two of a file with more than two tab-separated column (but the lines may have a different number of columns, i.e. more or less columns), according to the following conditions. When the value of column two is... (5 Replies)
Discussion started by: mjomba
5 Replies

7. Shell Programming and Scripting

Change file content 4 column to one Column using script

Hi Gurus, I have file content sample: ,5113955056,,TAgent-Suspend ,5119418233,,TAgent-Suspend ,5102119078,,TAgent-Suspend filenames 120229H5_suspend, 120229H6_unsuspend I receive those files one of directory /home/temp/ I need following: 1. Backup first /home/temp/ file to... (5 Replies)
Discussion started by: thepurple
5 Replies

8. Shell Programming and Scripting

awk or sed: change the color of a column w/o screwing up column spacing

Hey folks. I wrote a little awk script that summarizes /proc/net/dev info and then pipes it to the nix column command to set up column spacing appropriately. Here's some example output: Iface RxMBytes RxPackets RxErrs RxDrop TxMBytes TxPackets TxErrs TxDrop bond0 9 83830... (3 Replies)
Discussion started by: ryran
3 Replies

9. Shell Programming and Scripting

Change column to row base on column 2

Hi Guys, Input.txt L194 A -118.2 L194 B -115.1 L194 C -118.7 L196 A 0 L196 C 0 L197 A -111.2 L197 B -118.9 L197 C -119.9 L199 A -120.4 L199 B -119.9 ... (2 Replies)
Discussion started by: asavaliya
2 Replies

10. Shell Programming and Scripting

How to replace the 10th column?

how to replace the 10th colum? Each line begins similarly, but they all ends variously. Col1,Col2,Col3,Col4,Col5,Col6,Col7,Col8,Col9,Col10,Col11,Col12,Col13,Col14,Col15,Col16,Col17 2015/03/14 15:00:04,2015/03/14 15:00:04,0,Server05,Omega-God,Beta_G,101011247,1,1,24,7,0,,339083645,1,1,... (9 Replies)
Discussion started by: ooilinlove
9 Replies
users-admin(1)							   User Commands						    users-admin(1)

NAME
users-admin - Configure local users and groups on the system. SYNOPSIS
users-admin [gnome-std-options] DESCRIPTION
users-admin enables the user to configure the local users and groups on the system. I also provides the ability to assign RBAC profiles to a user. OPTIONS
The following options are supported: gnome-std-options Standard options available for use with most GNOME applications. See gnome-std-options(5) for more informa- tion. EXAMPLES
Example 1: Running the main application. example% users-admin EXIT STATUS
The following exit values are returned: 0 Application exited successfully >0 Application exited with failure FILES
The following files are used by this application: /usr/bin/users-admin Executable for users and groups configuration. /var/spool/setup-tool-backends/data/users Where user template configurations are stored. /var/spool/setup-tool-backends/backup/users Backup directory for files that are modified. /var/run/setup-tool-backends/debug/users Debug logs can be found under here. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWgnome-system-tools | +-----------------------------+-----------------------------+ |Interface stability |Uncommitted | +-----------------------------+-----------------------------+ SEE ALSO
Latest version of the GNOME Desktop User Guide for your platform. time-admin(1), shares-admin(1), services-admin(1), network-admin(1), gnome-std-options(5), useradd(1M), usermod(1M), groupadd(1M), group- mod(1M), passwd(4), shadow(4), group(4), attributes(5) NOTES
YP/NIS, NIS+ and LDAP users should be aware that it's possible to have conflict with users configured in here with the result that an error will occur. You should ensure that local user's home accounts are located on local filesystems - e.g. creating a new entry in /home when it's mounted with automount will not work and as such the user may not be created. Written by Darren Kenny, Sun Microsystems Inc., 2006. SunOS 5.11 6 Nov 2006 users-admin(1)
All times are GMT -4. The time now is 10:46 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy