ghostdog74,
Completely agreed. I tried to write a code to fulfill my need. But I was not successful in that
Was thinking of taking account_name,successful logins, failed logins in different files and then merge them in one CSV file. I was able to parse output to three files but was getting stuck how to combine them. But at last your comment made me itching to complete my work. and i am glad i was successful. Thanks... you made my day.
My work around:
$cat logins|sed 's/,//g'|grep -v "Successful Logins."|grep -v "Failed Logins."|sed -n '1,${p,n;n;n;n;}' > account_name
$cat logins|sed 's/,//g'|grep -v "Successful Logins."|grep -v "Failed Logins."|sed -n '2,${p,n;n;n;n;}' > success_internal
$cat logins|sed 's/,//g'|grep -v "Successful Logins."|grep -v "Failed Logins."|sed -n '3,${p,n;n;n;n;}' > success_external
$cat logins|sed 's/,//g'|grep -v "Successful Logins."|grep -v "Failed Logins."|sed -n '4,${p,n;n;n;n;}' > fail_internal
$cat logins|sed 's/,//g'|grep -v "Successful Logins."|grep -v "Failed Logins."|sed -n '5,${p,n;n;n;n;}' > fail_external
it created 5 files
and then
$paste -d, account_name success_internal success_external fail_internal fail_external > final_result
It gave although not a desired result, but the result which i could produce, manager is happy with that
Thanks everyone. Thanks to radoulov. I have not tested this code but will soon be testing it. Curious to get understand each and every line of this code.
-Ravi