Given your sample with (n)awk you can do something like this:
Output:
The regexp in nawk considers also the case when the variables are empty, if needed.
Edit: I used your code on a single record and it worked like a charm. Is there any way I can get that same output on multiple records?
Edit2: Disregard the below... I kept your RS=' ' the same and ran the code on an entire 400 record file, and it did output different variables for each record, but with no formatting. I need it to give a newline at the end of each individual record. Ideas?
Thanks for that.. looks like the right idea. How would I implement that if I have a file with about 400 records like the one above? Each new record is started by the "acl add" line. I tried the following with no success...
Added a ! to the start of each record:
then I used your code, but changed the RS=' ' to RS='!'... not sure if this was the right idea.
Then I just did:
That didn't work and I didnt figure it would... is there any way to make awk spit out those variables after evaluating each record?
Hi There,
I wonder if any one can help me.
I want to transfer a file from one site to another over an encrypted link. I want to know if there will be any imcrease in the data that will travel on the link? For example, I want to transfer a 1 GB file from one site to another, using an encrypted... (4 Replies)
Hello,
I just installed RHEL6 OC on my T61p. It's great!
Just for fun I'd like to use some fancy cool Desktop effects. I tried to enable 3D Desktop effects from OC Welcome Center but it gave me error message:
Accelerated 3D graphics is not available. Desktop effects require hardware 3D support.... (7 Replies)
I installed rhel 6.0 in my laptop but it is not upporting 3d graphics of rhel6 and i am getting an error message
"Accelerated 3d graphics not available
Desktop effects require hardware 3D support."
my laptop is dll studio 1558 and my graphic card is ATI Radeon 5470 with 1 gb dedicated ram. (6 Replies)
Hi Folks!
I accidentally overwrote in /etc/fstab file. Can you guys please tell me, what impact it would have created, when I restarted the machine(RHEL6).
I executed this command :
# blkid /dev/vda5 > /etc/fstab (17 Replies)
How will Full Disk encryption effect how open-source software is compiled and run using ubuntu 14.04. Are there alternatives that are recommended? Thank you :). (0 Replies)
Does anyone know a way to remove filter effects from videos downloaded from YouTube or elsewhere, preferably with software that runs in Windows 7?
Thank you in anticipation. (1 Reply)