Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

switching and moving characters around
Hi all;

I'm a total awk noob but i think awk is the right tool for what i need
to do.

I have lines of semi jumbled data ( there is a definite pattern to it,
so this is why i figured awk might be good) that we need to move
around a bit...

ie:
der@@f needs to read fred
reta@@w needs to read water

etc.

I have zero clue how to start off with this.

any help would be appreciated, or if awk is the wrong tool maybe can
someone suggest the correct tool

Cheers,

Gary

Report this thread to moderator Post Follow-up to this message
Old Post
Gary Hartl
03-20-04 01:23 AM


Re: switching and moving characters around
Gary Hartl wrote:
> Hi all;
>

[ . . .]

>
> I have lines of semi jumbled data [ . . . ] that we need to move
> around a bit...
>
> ie:
> der@@f needs to read fred
> reta@@w needs to read water
>
> etc.
>

[ . . . ]

{
for (i = split($0, A, ""); i > 0; i--)
if (A[i] != "@") printf A[i]
print ""
}

--
Regards,

---Robert

Report this thread to moderator Post Follow-up to this message
Old Post
Robert Katz
03-20-04 01:23 AM


Re: switching and moving characters around
Gary Hartl <the-smtpguy@cogeco.ca> wrote:
> Hi all;
>
> I'm a total awk noob but i think awk is the right tool for what i need
> to do.
>
> I have lines of semi jumbled data ( there is a definite pattern to it,
> so this is why i figured awk might be good) that we need to move
> around a bit...
>
> ie:
> der@@f needs to read fred
> reta@@w needs to read water
>
> etc.
>
> I have zero clue how to start off with this.
>
> any help would be appreciated, or if awk is the wrong tool maybe can
> someone suggest the correct tool

man tr
man rev

--
William Park, Open Geometry Consulting, <opengeometry@yahoo.ca>
Linux solution for data management and processing.

Report this thread to moderator Post Follow-up to this message
Old Post
William Park
03-20-04 01:23 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

AWK archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 04:54 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.