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
[/linux]
permanent link: individual
||permanent link: story
||
permanent link: category