Hi guys,
I usualy am able to google awk stuff but I can't find it so far and there are so many awking gurus here that I will give it a shot.
I want to print $1;$3;"$5 up to the $NF". In other words, I can have 1000 colums, but need to have $5 up to the end.
I started with the idea of "removing" the unwanted colums but the thing is that I need to have a field seperator ( between $1 $3 and $5.
Original data looks like:
randomuser UID default_group GID Name of the user
And I would like it to look like:
randomuser;default_group;Name of the user
I still hate SOX audits ... I would do it manually, but we're talking about 50ish servers and 50ish groups ...
Any good ideas?
---------- Post updated at 11:03 AM ---------- Previous update was at 10:58 AM ----------
Nevermind ...
my_stupid_command | while read a b c d e; do echo $a";"$c";"$e;
It works just fine