[K12OSN] OT: Bash help

Robert Arkiletian robark at gmail.com
Tue Nov 20 05:37:03 UTC 2007


On Nov 19, 2007 8:52 PM, Les Mikesell <les at futuresource.com> wrote:
> Robert Arkiletian wrote:
> >
> > Okay Peter how is this?
> > if I understand correctly you have multiple files
> >
> > file1    file2   file3
> >
> > bob    14      male
> > kate   13      female
> > john   15      male
> > sue    16      female
> >
> > where each file contains info fields that are in order (so bob is 14
> > and he is male)
> > which you want to change into one file
> >
> > contacts
> >
> > bob:14:male
> > kate:13:female
> > john:15:male
> > sue:16:female
>
> Errr.. if that's all:
> paste -d: file1 file2 file3  >outputfile
>

(Smiling with a big grin)
18 lines of python = 1 line unix utility
I think I just ported paste to Python (all I need to add are command
line args) haha

Well Les. This has been a good learning experience for me. ;-]
Now, I will never forget paste. I didn't even know it existed.
I feel like grasshopper in kungfu. No substitute for experience. My
hat's off to you Les. I'm glad you're on this list.

-- 
Robert Arkiletian
Eric Hamber Secondary, Vancouver, Canada
Fl_TeacherTool http://www3.telus.net/public/robark/Fl_TeacherTool/
C++ GUI tutorial http://www3.telus.net/public/robark/




More information about the K12OSN mailing list