Hi to all,
Please some help from the experts.
I have a text file with system user information in two columns divided in blocks, (many blocks)
beginning with "Account user". Within the first column there are words that are repeated through
the file in other blocks information for other users. In second column is written the info related to every
particular user defined in the system as we can see below of every "Account user" field in first column.
*Some blocks contain less fields or lines than others.
I'd like to tabulate, organize the same information putting the repeated fields in the first column as headers in a new file. Saying that the block that contain the maximun number of fields in the 1rst column has 5 fields, the number of columns (or headers) in the new file would be 5, without count the fixed column that would contain the header "Account user". In total would be 6.
Example:
I have this:
Account user
jsmith
Full Name ---------------------- John Smith
User's comment ------------------With this profile I can change everything
Password last set -----------------10/22/08 2:18 PM
Workstations allowed --------- ----All
Group Memberships --------------Administrators Users
Account user
mkendall
Full Name ---------------------- Mark Kendall
Password last set ----------------11/02/2008 7:19
Group Memberships --------- Operators Users
.
.
.
and continues..
I'd like to obtain an arrangement as follow:
(The blocks with less fields would appear with empty spaces under some columns)
Any suggestion on how can I do this will be appreciated.
Thanks in advance.
Please some help from the experts.
I have a text file with system user information in two columns divided in blocks, (many blocks)
beginning with "Account user". Within the first column there are words that are repeated through
the file in other blocks information for other users. In second column is written the info related to every
particular user defined in the system as we can see below of every "Account user" field in first column.
*Some blocks contain less fields or lines than others.
I'd like to tabulate, organize the same information putting the repeated fields in the first column as headers in a new file. Saying that the block that contain the maximun number of fields in the 1rst column has 5 fields, the number of columns (or headers) in the new file would be 5, without count the fixed column that would contain the header "Account user". In total would be 6.
Example:
I have this:
Account user
jsmith
Full Name ---------------------- John Smith
User's comment ------------------With this profile I can change everything
Password last set -----------------10/22/08 2:18 PM
Workstations allowed --------- ----All
Group Memberships --------------Administrators Users
Account user
mkendall
Full Name ---------------------- Mark Kendall
Password last set ----------------11/02/2008 7:19
Group Memberships --------- Operators Users
.
.
.
and continues..
I'd like to obtain an arrangement as follow:
(The blocks with less fields would appear with empty spaces under some columns)
Code: Select all
Account user--Full Name-----User's comment------------Password last set----Workstations allowed--Group Memberships
jsmith--------John Smith----I can change everything------10/22/08 2:18 PM----------All----------Administrators Users
mkendall------Mark Kendall-------------------------------11/02/08 7:19 AM-------------------------Operators Users
Any suggestion on how can I do this will be appreciated.
Thanks in advance.