From Michael's Information Zone
Jump to: navigation, search

[1]

General Notes

awk '{print $0}'

To use brackets as a seperator

[2]

echo "D:AI(A;OICI;GRGX;;;S-1-5-21-XXXXX0)(A;OICIID;0x1200a9;;;AU)(A;OICIID;FA;;;SY)(A;OICIID;FA;;;BA)(A;OICIID;FA;;;S-1-5-21-XXXXX1)" | awk 'NR {print $1}' RS='(' FS=')'
D:AI
A;OICI;GRGX;;;S-1-5-21-XXXXX0
A;OICIID;0x1200a9;;;AU
A;OICIID;FA;;;SY
A;OICIID;FA;;;BA
A;OICIID;FA;;;S-1-5-21-XXXXX1