Link to home
Start Free TrialLog in
Avatar of dsrnu
dsrnu

asked on

Format /etc/password file fields into rows/columns in excel

Hi everyone,

I have an /etc/password file with the following template below. Is there an easy way I can put them into rows and columns? ie:

default | field1 | field 2 | field 3
deafult1 | result1 | result2 | empty

the problem im having is not all field names is included for each separate row so it's difficult to format... any ideas?
default:
	field1 = result1
	field2 = result2
default2:
	field1 = result1
	field2 = result2
	field2 = result2
	field2 = result2
	field2 = result2
default3:
	field1 = result1
	field2 = result2
	field2 = result2
default4:
	field1 = result1

Open in new window

Avatar of ittogo
ittogo

Just import and use the | as the separator.  As long as the | character is there, it should just leave an empty cell
dsrnu: What happens when there are duplicate entries like

        field2 = result2
        field2 = result2

Also is the above text stored in a text file?

Sid
Avatar of dsrnu

ASKER

yes its stored in text file. even if there are duplicate entries, i still want to put it in a row/column
A straight import as text into excel should still work
Is this the result that you are seeking?

Sid
Untitled.jpg
Avatar of dsrnu

ASKER

yes siddharthroul! any easy way i can do that?
I am on to it :)

Will paste the code shortly :)

Sid
Quick question.

What is the maximum number of fields are there for example field1, field2, field3 etc?

Sid
Avatar of dsrnu

ASKER

15
ASKER CERTIFIED SOLUTION
Avatar of SiddharthRout
SiddharthRout
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Tracy
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.