AWK
Jump to navigation
Jump to search
General Notes
awk '{print $0}'
To use brackets as a seperator
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