Solved

Help with awk or similar

Posted on 2006-11-14
1
200 Views
Last Modified: 2010-04-22
Hi, I'm a little rusty with awk scripting...here's what I'm trying to do...given this data file...

A92733
   FullName,Murthy, Anne
   AccountType,User
   LastLogonTime,11/14/2006 9:01 AM
A93779
   FullName,Smith, Alex
   AccountType,User
   LastLogonTime,11/14/2006 9:01 AM

...I would like a script that creates a separate file for each account number (the account number would be the file name) which would contain the corresponding data FullName etc.
0
Comment
Question by:veedar
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 58

Accepted Solution

by:
amit_g earned 500 total points
ID: 17941392
awk '{if (((NR - 1) % 4) == 0) {FileName=$0} else {print > FileName}}' YourDataFileName
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question