-
Notifications
You must be signed in to change notification settings - Fork 0
/
reorder.sh
executable file
·53 lines (49 loc) · 873 Bytes
/
reorder.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/bash
IN=$1
OUT=$IN.out
IFS=''
rm $OUT
read < $IN # Skip the table's first line.
while read HEADER
do
# Name each of your input columns here.
read ICON
read NAME
read UN
read AUS
read CAN
read EU
read FRA
read UK
read US
read IND
read RUS
read PRC
read TUR
read TUN
read IRN
read EGY
read KZ
read KSA
echo "Processing line $HEADER"
# Reorder each of the input columns to the order you want below.
# Feel free to skip any column you want to delete.
echo $HEADER >> $OUT
echo $ICON >> $OUT
echo $NAME >> $OUT
echo $AUS >> $OUT
echo $CAN >> $OUT
echo $EGY >> $OUT
echo $EU >> $OUT
echo $IND >> $OUT
echo $IRN >> $OUT
echo $KZ >> $OUT
echo $KSA >> $OUT
echo $PRC >> $OUT
echo $RUS >> $OUT
echo $TUN >> $OUT
echo $TUR >> $OUT
echo $UK >> $OUT
echo $UN >> $OUT
echo $US >> $OUT
done < $IN