4 |
# The file should be in one directory, where this script is run. |
# The file should be in one directory, where this script is run. |
5 |
# The resulting files will be in the same directory. |
# The resulting files will be in the same directory. |
6 |
|
|
7 |
DEBUG="-D 0" |
DEBUG="--dbg_lvl=0" |
8 |
|
|
9 |
inone=$1 |
inone=$1 |
10 |
inone=${1:?"You must input an mnc filename to be xploded"} |
inone=${1:?"You must input an mnc filename to be xploded"} |
26 |
somevar1=${somevar%(*} |
somevar1=${somevar%(*} |
27 |
somevar1=${somevar1#*double } |
somevar1=${somevar1#*double } |
28 |
somevar1=${somevar1#*float } |
somevar1=${somevar1#*float } |
29 |
echo $somevar1 |
# echo $somevar1 |
30 |
vars=${vars}$somevar1' ' |
vars=${vars}$somevar1' ' |
31 |
done |
done |
32 |
echo Variables to extract: $vars |
echo Variables to extract: $vars iter |
33 |
IFS=' ' |
IFS=' ' |
34 |
for somevar in $vars |
for somevar in $vars |
35 |
do |
do |
36 |
ncks $DEBUG -v $somevar $somefile $somevar.$somefile |
ncks $DEBUG -v $somevar $somefile $somevar.$somefile |
37 |
done |
done |
38 |
|
ncks $DEBUG -v iter $somefile iter.$somefile |
39 |
done |
done |