workflow-notes: makedirs_and_workingcopies.sh

File makedirs_and_workingcopies.sh, 572 bytes (added by Klaus Thoden, 13 years ago)

New version

Line 
1#!/bin/bash
2# Klaus Thoden, 2011-02-22
3
4# New version, adapted to our real needs.
5# Prerequisites: a directory named with the correct WO number and textfiles after the fashion
6# author_year_ID.txt
7# We get files from Formax in the style author_year.txt, and we manually have to add the id, which is cumbersome.
8
9# This makes the directories
10for i in *.txt; do mkdir -pv `ls $i|sed s/\.txt//g`/raw; done
11# This moves the text files into their respective directories and creates the Unix LF
12for i in *.txt; do tr -d '\r' < $i > `ls $i|sed s/\.txt//g`/raw/`ls $i`; done
13
14
15
16
17