AWK

From Michael's Information Zone
Revision as of 13:37, 4 October 2017 by Michael.mast (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to 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