Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash -eu
- NCDUMP='/export/emc3/RHEL6/util/gnu/netcdf-4.4.1.1/bin/ncdump'
- NC='/home/201612%02d_%02d.nc'
- AB='ab%02d_%02d.txt'
- [[ ! -x ${NCDUMP} ]] && exit 1
- for day in $(seq 1 31); do
- for hour in $(seq 0 23); do
- nc=$(printf "${NC}" ${day} ${hour})
- ab=$(printf "${AB}" ${day} ${hour})
- ${NCDUMP} -v lon ${nc} &>${ab}
- sed -i '1,283d' ${ab}
- done
- done
- cat ab??_??.txt >AB.txt
Add Comment
Please, Sign In to add comment