Tsuyoshi Takada wrote:
> 
> I wonder why it is regarded as homework when I question such a problem...

It just had that feel of the type of problem which is constructed as a
programming exercise given to students.  It is very common for
students to try to use the net to get help for their assignments.  I
have become more cautious.

> This is pure question. I have thinked for more than one week but I
> could not reached to the good idea.

Please accept my sincere apology.

> I have perl skill for a few years and it is very easy to realize
> this with perl script file, but I want to accomplish this on command
> line because I easily want to do it too on the machines except my
> machine.  If every time I write a perl script file and copy it to
> the other machine, it costs much time.

I cannot personally think of any way to easily accomplish this with
the core set of utilities.  But perhaps others on the list will take
it as a challenge to produce a way and to educate both of us.

However, a one line ruby script comes to mind.

  ruby -e '$/="delimiter";ARGF.each { |line| puts line.chomp.split(" ").join("\t") }'

This of course can be done similarly with perl.

  perl -e '$/="delimiter";for (<>) { chomp; print join("\t",split(" ")),"\n";}'

And even those could almost certainly be simplified further.

Bob


_______________________________________________
Bug-coreutils mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to