I need some contents to be written in csv format to a file.
shell: ps -ef | grep java | awk '{print $1}'
register: username
shell: ps -ef | grep java | awk '{print $2}'
register: id
The output for username will be similar to :
root
admin
test_admin
The output for id will be similar to:
1232
4343
2233
so I want this to be written to a csv file as
root,1232
admin,4343
test_admin,2233
Please suggest.
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/90a8376f-1d5b-4758-aa00-60b004eae1f2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.