Sponsored Content
Top Forums Shell Programming and Scripting Splitting Chunked-FullNames Nightmare Post 302143772 by RacerX on Saturday 3rd of November 2007 01:32:06 PM
Old 11-03-2007
Splitting Chunked-FullNames Nightmare

I've got a problem i'm hoping other more experienced programmers have had to deal with sometime in their careers and can help me: how to get fullnames that were chunked together into one field in an old database into separate more meaningful fields.

I'd like to get the records that nicely fit into the pattern of firstname middleinitial lastname into three fields separated by a colon, and skip the other names that don't fit that pattern until i figure out what to do with them (any suggestions welcome).

GIVEN INPUT:
Code:
DONNIE BERG
JERRY M MAGUIRE
D A BROWN
RICHARD N STYLES & FRANK A PERRY
MITCH GARBO & BOBBI MILLS
JUDY & STONE RUFFEY
MRS K H SCHULTZ
JASPER O & SUZI M THOMPSON
DAY FRANKLIN-MIZER
BO & TYRA J SLACK
JERRY B DE TUNA
CHARLES C VICTOR III
DARREN E MC FANN
TOM E VARBLE JR
MARY W & CAROLYN SMILEY
BAHAMA FARMS TOWNSHIP INC & HERME BLUE INC
STAN N GAIL & HIDDEN VALLEY FARMS
DRIPP CREEK FARM
Y Z & S T OUTTRIM
WM AND VI JOYNER SALES
A C A SALES
ADDONIS SYNDICATE & LOWLAND MEADOW

DESIRED OUTPUT:
Code:
DONNIE: :BERG
JERRY:M:MAGUIRE
D:A:BROWN
RICHARD:N:STYLES:FRANK:A:PERRY
MITCH: :GARBO:BOBBI: :MILLS
JUDY: :RUFFEY:STONE:RUFFEY
K:H:SCHULTZ
JASPER:O:THOMPSON:SUZI:M:THOMPSON
DAY: :FRANKLIN-MIZER
BO: :SLACK:TYRA:J:SLACK
JERRY:B:DE TUNA
CHARLES:C:VICTOR III
DARREN:E:MC FANN
TOM:E:VARBLE JR
MARY:W:SMILEY:CAROLYN: :SMILEY
BAHAMA FARMS TOWNSHIP INC & HERME BLUE INC
STAN:N:GAIL & HIDDEN VALLEY FARMS
DRIPP CREEK FARM
Y Z & S T OUTTRIM
WM AND VI JOYNER SALES
A C A SALES
ADDONIS SYNDICATE & LOWLAND MEADOW

 

8 More Discussions You Might Find Interesting

1. HP-UX

Viewcvs...a nightmare on HP-UX!!!

Hello I'm new on this forum but I have a big problem. I've installed Subversion 1.1.1 and Apache 2.0.52 on a HP-UX. This is the uname: HP-UX xxxx B.11.11 U 9000/800 4169945236 unlimited-user license Now I must to install a software to browse the svn repositories. My choice is Viewcvs. ... (3 Replies)
Discussion started by: goblin79
3 Replies

2. UNIX for Dummies Questions & Answers

installing apache (nightmare for me)

Please help... i'm new to this job and new to unix as well..... i'm trying to install apache 2.2.6 it's installed on one server... i need to install it on another server... my clue was to maybe use the fetch command... please help.....for example..... apache is on 69.50.132.14.... and it needs to... (1 Reply)
Discussion started by: marinob007
1 Replies

3. UNIX for Dummies Questions & Answers

is unix really such a nightmare... or is it me?

i rue the day that my server manager and i parted company... the start of a long journey.... :( sometimes i find myself daydreaming about the days when i could say... "this dont work, can u fix it?".... and 2 mins later it worked! i have a new way of "cursing" at ppls.... i just say "failed... (10 Replies)
Discussion started by: mickeymouse
10 Replies

4. BSD

FreeBSD nightmare!!!

Dear friends out there, i hope u'll have enough time to read this problem of mine and try to help me solve it. well, i've been a long time user of microsoft products and happened to come across FreeBSD when one fellow referred me to it saying that it was a wonderful OS which one could use for web... (6 Replies)
Discussion started by: kenyatta
6 Replies

5. Solaris

date -d nightmare on Solaris

Hello there ppl, I thought my question would qualify to be posted in this forum and in Shell scripting forum. And I swear to God.. there is no discussion on this exact topic anywhere else on the web! So my script on BASH uses 2 commands: 1) date -d "Fri Mar 06 10:18:16 UTC 2009" +%s ... (1 Reply)
Discussion started by: pavanlimo
1 Replies

6. Shell Programming and Scripting

ftp nightmare

Hi everyone I have a Fedora FTP server (lets call it FTP-SERVER1) and files are constantly being uploaded to it from a 3rd party. Once every 15 minutes I need to "move" the files from the FTP server to another server (lets call it SVR-WINDOWS) where it will be processed and then deleted. ... (3 Replies)
Discussion started by: soliberus
3 Replies

7. Solaris

AI server corporate nightmare

Hello Ex-Sun fellows, i've been tasked to install a bran spanking new AI Solaris 11.1 server for our Oracle park. With the documentation this is what's running and what's working. T5120 2 oracle VM's (one ldom on each disk) One with a Solaris 11.1 repo, AI server. One for testing... (0 Replies)
Discussion started by: maverick72
0 Replies

8. Shell Programming and Scripting

Frequency Count of chunked data

Dear all, I have an AWK script which provides frequency of words. However I am interested in getting the frequency of chunked data. This means that I have already produced valid chunks of running text, with each chunk on a line. What I need is a script to count the frequencies of each string. A... (4 Replies)
Discussion started by: gimley
4 Replies
platform::shell(n)					       Tcl Bundled Packages						platform::shell(n)

__________________________________________________________________________________________________________________________________________________

NAME
platform::shell - System identification support code and utilities SYNOPSIS
package require platform::shell ?1.1.4? platform::shell::generic shell platform::shell::identify shell platform::shell::platform shell _________________________________________________________________ DESCRIPTION
The platform::shell package provides several utility commands useful for the identification of the architecture of a specific Tcl shell. This package allows the identification of the architecture of a specific Tcl shell different from the shell running the package. The only requirement is that the other shell (identified by its path), is actually executable on the current machine. While for most platform this means that the architecture of the interrogated shell is identical to the architecture of the running shell this is not generally true. A counter example are all platforms which have 32 and 64 bit variants and where a 64bit system is able to run 32bit code. For these running and interrogated shell may have different 32/64 bit settings and thus different identifiers. For applications like a code repository it is important to identify the architecture of the shell which will actually run the installed packages, versus the architecture of the shell running the repository software. COMMANDS
platform::shell::identify shell This command does the same identification as platform::identify, for the specified Tcl shell, in contrast to the running shell. platform::shell::generic shell This command does the same identification as platform::generic, for the specified Tcl shell, in contrast to the running shell. platform::shell::platform shell This command returns the contents of tcl_platform(platform) for the specified Tcl shell. KEYWORDS
operating system, cpu architecture, platform, architecture platform::shell 1.1.4 platform::shell(n)
All times are GMT -4. The time now is 06:20 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy