Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- for M in $(seq -w 12); do
- YM="2016${M}"
- mkdir -p ${YM}
- paste \
- "abc_la${M}5.txt" \
- "abc_lo${M}5.txt" \
- "abc_b${M}5.txt" \
- "abc_h${M}5.txt" \
- "abc_q${M}5.txt" \
- "abc_f${M}5.txt" \
- "abc_m${M}5.txt" | \
- awk -v m="${YM}/abc_%02d.txt" '!$4{++d;f=sprintf(m,d)};{print >f}'
- cd ${YM}
- ls abc_[01][0-9].txt | xargs -n1 sed -n '$=' >abc_num.txt
- cd ..
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement