view concatenate_ordered.bash @ 2:6f5ce4e865a5 draft

Deleted selected files
author kyost
date Sat, 28 Apr 2018 19:45:57 -0400
parents fd3ea97a96bc
children
line wrap: on
line source

#!/bin/bash

input1=$1
output1=$2

echo $input1 |tr , '\n' > input_series

cat input_series | while read file
do
	cat $file >> count_list
done

sort -k1 count_list > sorted_list
cut -f 2 sorted_list > $output1

rm input_series
rm count_list
rm sorted_list