Re: OT: a problem about text manipulation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/31/06, David Fletcher <fc@xxxxxxxxxxxxxxxx> wrote:
>I have a text file with more than 300000 of lines like the following:
>
>1       E       E       E
>2       C       D
>3       B       E       D
>4       C       E       D
>5               D       E
>
>I am looking for an automatic way of transforming my text file into
>another one with the format
>
>1       E
>1       E
>1       E
>2       C
>2       C
>3       B
>3       B
>3       D
>4       C
>4       C
>4       D
>5       E
>
>Any ideas?

I am guessing that the transformation should have been
1 E
1 E
1 E
2 C
2 D
3 B
3 E
3 D
4 C
4 E
4 D
5 D
5 E
????

I'm not that great at scripting which somebody else will no doubt
suggest, so personally I'd write a little C/C++ application to do it.
I've got a string parsing function that I wrote to split a string
into white space delimited fields and return a count of the number of
fields, which would be a good starting point for this.

Correct guess, Dave.

Is there something easier than C/C++? Since I am not a programmer, I
would like to use a tool very easy of learning.

Paul

--
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux