Turgut Durduran's Site -- about Cyprus, Photography, Linux, LaTeX, Human Rights, Politics ...

Frontpage | Hamamboculeri | Research| My Flickr
my Flickr

Wed, 16 Aug 2006

cut/paste chunks of input, organize etc.

This is one of my "self-notes". To cut at "_" and get the second field. I had files names look like  DbFitstroke_072806_subjectST17.m  . I wanted a list of dates.
the following gets the dates:
ls DbFitstroke_*.m |cut -f2 -d _  > studydatelist081606.txt
the following gets the subject ID's, notice nested cut commands.
 ls DbFitstroke_*subject*.m |cut -f3 -d _  | cut -f2 -d t |cut -f2 -d T |cut -f1 -d .

combine two files as columns
paste -d _ subjectIDlist081606.txt studydatelist081606.txt > subjectdatefile.txt

See more ...

[/linux] permanent link: individual ||permanent link: story || permanent link: category


On the Stolen Cypriot Antiquities
A rather undetailed but nevertheless interesting piece appeared in Cyprus Mail announcing an exhibition in impressive but very outdated and poorly maintained Cyprus Museum. It tells the story of *deliberate* destruction of our island's historical and cultural heritage from the viewpoint of antiquities. Books can be written about that topic. Names, organizations can be put out but unfortunately they are still alive, kicking and still "unknown".

See more ...

[/cyprus] permanent link: individual ||permanent link: story || permanent link: category